update the database.