next up previous
Next: Complex Types and Object Up: Object-Relational Databases Previous: Object-Relational Databases

Nested Relations

  1. 1NF requires that all attributes have atomic (indivisible) domains.
  2. The nested relational model is an extension of the relational model in which domains may be either atomic or relation-valued. This allows a complex object to be represented by a single tuple of a nested relation -- one-to-one correspondence between data items and objects.
  3. Suppose the information to be stored consists of (i) document title, (ii) author_list (set of authors), (iii) date (day, month, year), and (iv) key_word_list (list of key words).
  4. Example: A non-1NF document relation, doc.

    table55

  5. The doc relation can be represented in 1NF, doc', but awkward. If we assume the following multi-value dependencies (MVDs) hold:
     
    title  tex2html_wrap_inline443  tex2html_wrap_inline443  author
    

    title tex2html_wrap_inline443 tex2html_wrap_inline443 keyword

    title tex2html_wrap_inline443 day month year

    we can decompose the relation into 4NF using the schemes:

     
    (title, author)
    

    (title, keyword)

    (title, day, month, year)

  6. But the non-1NF representation may be an easier-to-understand model (closer to user's view). The 4NF design would require users to include joins in their queries, thereby complicating interaction with the system. We could define a view, but we lose the one-to-one correspondence between tuples and documents.


Osmar Zaiane
Tue Jul 7 15:03:55 PDT 1998