Re: Multiple-Attribute Keys and 1NF

From: JOG <>
Date: Tue, 28 Aug 2007 14:06:28 -0000
Message-ID: <>

On Aug 28, 2:35 pm, "David Cressey" <> wrote:
> "JOG" <> wrote in message
> > I am still fighting with the theoretical underpinning for 1NF. As
> > such, any comments would be greatfully accepted. The reason for my
> > concern is that there /seems/ instances where 1NF is insufficient.
> Insufficient for what? I wasn't able to infer this from your example.
> > 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.
> In the US, house current is typically at a nominal 120V, except for a few
> circuits, like stoves that are driven at a nominal 240V. Nominal 120V can
> vary all the way down to 110V. At some point below that, "brown out"
> begins.
> Where the coded meaning of the wires gets to be "interesting" is where you
> have an overhead light controlled by a wall switch. If there are two double
> pole switches controlling the same light it gets more interesting.
> In general, the meaning is:
> Black -- live
> Red -- live (out of phase with black)
> White -- neutral
> Green -- ground
> bare -- ground.
> However, in many homes, the wire from the appliance to the controlling
> switch has been
> The stove in my house has a clock/timer on it that is driven by 120V is
> wired with the standard 3 connector wire consisting of a white wire, a black
> wire, and a bare wire.
> In this case, the black wire is used to carry (unswitched) power from the
> overhead junction box to the switch. The companion white wire is used to
> carry (switched) power from the switch to the power side of the light
> circuit, which is a black wire.
> The above results in a white wire being connected to a black wire. This
> looks "wrong" to a DIY neophyte. The official code uses bits of colored
> tape to indicate such things as "white coded as black", but that's over my
> head.
> The electrical wiring in some homes dates back about a century, before the
> wires had colors. Things get really interesting then.

Ah, when men were real men, and wired electrics up with their teeth ;)

> All of this is a digression from 1NF. Again, 1NF is insufficient for
> what?

Insufficient is probably the wrong word. I'm having trouble finding a direct 1NF encoding of propositions such as:

Brown -> live.
Red -> live
Blue -> neutral.
Black -> neutral.
Green ^ yellow -> earth.

that doesn't require the addition of a surrogate identifier or the use of nested relations, neither of which seem to exist in the original propositions.

Its perhaps a symptom concern with propositions where there are two components that play the same role - such as a friendship relation: E.g. if Fred and Barney are friends we have to encode them under different attribute names in RM, whereas they are actually playing exactly the same role (of "friend"). Using "Friend1" and "Friend2" don't seem wholly elegant. If I took Kevin's approach (which I am still chewing over) for this latter example I'd end up with:

Id Friend

1 Fred
1 Barney
2 Wilma
2 Betty

again with the use of some sort of surrogate identifier, to assuage the fact that a friendship (just like a pattern) is identified by more than one attribute playing equal roles. This addition seems to be adding complexity where it did not originally exist. (The caveat to all this being that historically any misgivings with RM I've had have turned out to be down to a weakness in my grasp of it). J. Received on Tue Aug 28 2007 - 16:06:28 CEST

Original text of this message