Re: Multiple-Attribute Keys and 1NF

From: JOG <jog_at_cs.nott.ac.uk>
Date: Tue, 28 Aug 2007 15:10:47 -0700
Message-ID: <1188339047.339935.134570_at_d55g2000hsg.googlegroups.com>


On Aug 28, 9:27 pm, mAsterdam <mAster..._at_vrijdag.org> wrote:
> JOG wrote:
> > I am still fighting with the theoretical underpinning for 1NF.
>
> My answer won't help you in that quest, sorry.
> I like the example, but I don't think it illustrates a NF problem.
> Yet I like it because I think it illustrates a much more basic,
> non-formal issue.
>
> > As such, any comments would be greatfully accepted.
> > The reason for my concern is that there
> > /seems/ instances where 1NF is insufficient. An
> > example occurred to me while I was wiring up a dimmer switch (at the
> > behest of mrs. JOG, to whom there may only be obeyance). Now I don't
> > know the situation in the US, but in the UK a while back the colour
> > codes for domestic main circuit wiring changed. Naturally the two
> > schemes exist in tandem, as exhibited in every house I've had the joy
> > of doing some DIY in:
>
> > Brown -> live.
> > Red -> live
> > Blue -> neutral.
> > Black -> neutral.
> > Green and yellow -> earth.
>
> This is dictionary of a little language.
> left of the '->' is the code, to the right of it is the explanation.
> The code is expressed with colors as symbols,
> just as in our phonographic latin the words are expressed
> with soundsymbols. A color-alphabet. The codes are not colors as such.
> Your information need is the code explanation, not
> anything about the colors.

Confuscious, he say mAsterdam, he wise ;)

I wholly agree that any encoding is biased to a certain expected information need. However I have always worked on the principle that in a theoretical model I want to minimize this query bias as much as feasibly possible (and therein lies the strength of the RM over other approaches). Consequently In this instance I see what one can gain by encoding "Green" and "Yellow" separately in terms of flexibility, but not what one would lose. Either way, I am willing for the example to be interpreted in terms of such an information need.

>
> > The issue with encoding these propositions is that the candidate key
> > for each proposition may consist of one _or_ two colours.
>
> This is similar to asking how many characters can make up a
> word or how many words a sentence.

I was intending to describe of an item that is identified by two attributes which play the same role. Just knowing this might be desirable /I think/ validates the example.

What I am really struggling with is whether requirement of a surrogate key to achieve the information need (as a result of enforcing 1NF) has a theoretical basis. Is 1NF just there to provide a structure that fits a relation, or does it have a deeper purpose that I haven't yet grokked.

>
>
>
> > Now I have a
> > couple of options, none of which seem satisfactory. I could leave
> > green & yellow as some sort of set-value composite, but obviously this
> > would affect my querying capabilities, so thats out straight off the
> > bat. Similarly adding attributes Colour1 and a nullable Colour2 is
> > simply so hideous it isn't worth consideration. So, I could ungroup to
> > give me:
>
> > Colour Type
> > -----------------
> > Brown live
> > Red live
> > Black neutral
> > Blue neutral
> > Green earth
> > Yellow earth
> > -----------------
>
> These problems arise because you have taken it upon you to model
> language itself instead of a mere administrative problem.
> This is a non-trivial task :-)
>
> [snip more language modeling attempts]
>
> > I am having a crisis of faith with the way 1NF is currently viewed.
> > Any ideas to solve my dilemma? Am I on my own in being perturbed?
Received on Wed Aug 29 2007 - 00:10:47 CEST

Original text of this message