Fix DatabaseConnect::getFromDatabaseName

Also added another unit tests.
Minor changes.