move add_to_db method to Database class