Object-Relational Support

Structured Query Language (SQL) provides four column data types for OR storage as well as support for user-defined data types (UDTs). SQL's OR features include three column data types for storing multiple values: ROW, ARRAY, and MULTISET. One can use these data types without using any of the other OR features. Because they do not act as objects, these columns cannot have methods. A column declared as a row type holds an entire row of data. This gives the equivalent of a table within a table. The contents of the row—called fields—can be declared as built-in data types or UDTs. An array is an ordered collection of elements. Like arrays used in programming, they are declared to have a maximum number of elements of the same type. That type can be a simple data type or a UDT. A multiset is an unordered collection of elements of the same type. One specifies the contents of a multiset when insert a row into a table much like one does for an array. The only difference is the use of the keyword MULTISET to indicate that the values in parentheses are intended as a single group.