Transferred database access to get_db.