added disconnectDatabase implementation.
Untested.