[REFACTOR] Eliminated code doubling in iDatabase.cc.