update to db