complete the database operations