Thou shalt support complex objects
Complex objects are built from simpler ones by applying constructors
to them. The simplest objects are objects such as integers,
characters, byte strings of any length, booleans and floats (one
might add other atomic types). There are various complex object
constructors:
tuples, sets, bags, lists, and arrays are examples. The minimal set of
constructors that the system should have
are set, list and tuple. Sets are critical because they are
a natural way
of representing collections from the real world. Tuples are critical
because they are a natural way of representing properties of an
entity. Of course, both sets and tuples are important because they
gained wide acceptance as object constructors through the relational
model. Lists or arrays are important because they capture
order, which
occurs in the real world, and they also arise in many scientific
applications, where people need matrices or time series data.
The object constructors must be orthogonal: any constructor should apply to any object. The constructors of the relational model are not orthogonal, because the set construct can only be applied to tuples and the tuple constructor can only be applied to atomic values. Other examples are non-first normal form relational models in which the top level construct must always be a relation.
Note that supporting complex objects also requires that appropriate operators must be provided for dealing with such objects (whatever their composition). That is, operations on a complex object must propagate transitively to all its components. Examples include the retrieval or deletion of an entire complex object or the production of a ``deep'' copy (in contrast to a ``shallow'' copy where components are not replicated, but are instead referenced by the copy of the object root only). Additional operations on complex objects may be defined, of course, by users of the system (see the extensibility rule below). However, this capability requires some system provided provisions such as two distinguishable types of references (``is-part-of'' and ``general'').