getDB() functionality