Re: Normalisation

>> Jan Hidders wrote:
>>
>>>> Are values in domains not atomic by definition, irrespective of any
>>>> internal structure they may have? (Structure invisible to the
>>>> relational
>>>> operators, that is).
>>>
>>>
>>> Yes, but that depends a bit on what you take as "the set of relational
>>> operators". If that includes nesting and unnesting then you make the
>>> structure of nested relations visible, and you should therefore consider
>>> them non-atomic.
>>
>>
>> OK I see. I've never understood the appeal of "nesting" or "unnesting"
>> relations. It doesn't seem to add anything to the relational model and
>> only serves to complicate things. Does anyone have a concrete example of
>> the usefulness of this? Any I've seen in the past seem to be trival to
>> implement in a standard relational model.

Sorry about one extra level of quote...

The only place where I've seen any plausible use for nested relations
was in C J Date's work where he discussed using a relation-valued
attribute (RVA) as the primary key (PK) of a relation describing
functional dependencies (FD) in a relation schema. The PK is the set of
attributes in the determinant (left-hand side, LHS) of the FD. The RHS
would also be a relation-valued attribute. (If the RHS is a simple
attribute (containing the names of attributes in the described relation
schema), then the RVA is not the PK - the combination of the RVA plus
the singleton attribute is the PK.)

You can model this without any RVA by assigning a name to the FD, then
describing the determinant set in one relation and the determined set in
another. In SQL (simplified):