update database.