Re: MV Keys

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Thu, 2 Mar 2006 13:58:25 +0100
Message-ID: <MPG.1e710a57fa58633d98976f_at_news.ntnu.no>


In article <37nb021qqap1u260i37pn0fp6o1qm1h42g_at_4ax.com>, invalid_at_bigfoot.com says...
> Good stuff, Jon. What bothers me most is that there is no apparent
> formal distinction between this:
>
> OrderID|CustomerID|Item1 |Item2 |Item3 | Item4 (...)
> =================================================================
> 1|foo_123 | apples| pears| bananas| oranges
> 2|bar_123 | pears| bananas| oranges|
> 3|bar_123 | bananas| | |
>
> etc., and this:
>
> OrderID|CustomerID|Items
> ================================================
> 1|foo_123 | apples;pears;bananas;oranges
> 2|bar_123 | pears;bananas;oranges
> 3|bar_123 | bananas
>
> Conceptually speaking, I think that most would agree that neither
> example is in 1NF, whereas technically speaking, either the first or
> the second example would be, depending on which textbooks you read,
> but certainly not both.

If you use Date's definition AND allow NULLs (strange, but possible :), you could definitely say that both are in 1NF. I say the second one certainly is, on the condition that the domain of Items is "list/set of fruits", not merely "fruit", of course. I think it is also apparent that the second design is the better of the two, for formal reasons.

-- 
Jon
Received on Thu Mar 02 2006 - 13:58:25 CET

Original text of this message