Re: How will schemas be affected by nested relations?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 22 Jul 2006 16:22:12 GMT
Message-ID: <Ugswg.13591$pu3.314478_at_ursa-nb00s0.nbnet.nb.ca>


Marshall wrote:

> How will schema design be affected by having the ability to use
> nested relations? I have an intuition that it might not be that
> much; that nesting is a *little* useful but not all that *much* useful.
> However, I am concerned that I don't have a normal form to
> inform design choices.
>
> When should relation schemas be nested?
>
> I have an idea that the answer might relate to when we use
> ON DELETE CASCADE. If a logical entity has no existence
> without the "enclosing" context of another entity, then it might
> be nested. Another consideration is whether it needs to
> be referred to directly.
>
> For example, an invoice line item without an associated
> invoice doesn't make much sense. However, an invoice
> is probably something we want to keep even if for some
> reason we delete the associated customer. So I can see
> invoice line items as being a candidate for nesting, but
> not invoices.
>
> However I would be much happier if I had a more formal
> treatment than this. Anyone have any references?

See Fabian's _Practical Issues..._ book for a treatment of the subject. You are correct that no theory instructs us on when to nest or not to nest. Unless part of the definition of the possible representation of some type, I suspect base relations should avoid nesting altogether.

Even if part of the definition of the possible representation of some type, if it is plausible to decompose the type into relvars, I suspect doing so in the base relations makes sense too. Received on Sat Jul 22 2006 - 18:22:12 CEST

Original text of this message