update to database