SQL encapsulates each attribute of structured types by providing a pair of built-in routines
that are invoked whenever a user attempts to reference the attribute, an observer (get)
function and a mutator (set) function. The observer function returns the current value of
the attribute; the mutator function sets the value of the attribute to a value specified as a
parameter. These functions can be redefined by the user in the definition of the UDT. In
this way, attribute values are encapsulated and are accessible to the user only by invoking
these functions. For example, the observer function for the fName attribute of PersonType
would be: