Database Reference
In-Depth Information
User-defined types
Using a tuple column to group educational information into a single column has several ad-
vantages, but there's also something missing. The education column comprises two
components: the first, a string, is the name of an educational institution, and the second, an
integer, is a graduation year. As the developers of the MyStatus application, we know what
the two components of the tuple represent; however, this knowledge is not made explicit
anywhere in the database definition.
To solve this problem, we can instead use a user-defined type . User-defined types are very
similar to tuples, except that each component has a name. This makes it easier for applica-
tion developers to easily infer the intent of a user-defined type. As we'll see shortly, user-
defined types offer a couple of other advantages over tuples.
Search WWH ::




Custom Search