implements database UPDATE operation.