Implementing QSQL required that we define the meaning of standard database operations in the presense of missing, expandable, and structured attributes.
Missing attributes can be either applicable or inapplicable [Cod90]. An applicable missing attribute is one that should have a value, but the value was unknown at the time of entry. An inapplicable missing attribute is one that has no value and the attribute does not have meaning for a particular tuple. QSQL treats all missing attributes as inapplicable. When necessary, a user can put a ``NULL'' value into an attribute to assert that it is applicable.
QSQL views tuples with expandable attributes as several tuples that agree on their simple attributes and contain all combinations of values of the expandable attributes.
Subattributes must be grouped together or chaos will result, as seen in the subattribute grouping from the student database shown in Figure 1. If each street is not grouped with the proper city, the address is nonsense. We must not separate the subattributes when translating tuples to a relational format. QSQL extends standard SQL by providing a syntax for specifying subattributes. In addition to traditional constructs of the form P.attribute = "string", QSQL also allows constructs of the form P.attribute.subattribute = "string".
Although QSQL methods for handling expandable and structured attributes may appear to cause update anomalies, they do not. Decomposition of a relation into a normal form is not necessary, because a tuple containing expandable and structured attributes is still a single tuple, albeit viewed as multiple tuples. Updates only operate on a single physical tuple (multiple logical tuples). Consistency can be checked at a higher level.
We chose -style regular expressions because they are much more flexible than those defined by the standard. Standard SQL allows only wildcard replacement.