Update the database.