update the db