db update method