Added script function for update operation in database