Re: Can we solve this -- NFNF and non-1NF at Loggerheads

From: Alan <alan_at_erols.com>
Date: Mon, 7 Feb 2005 11:34:27 -0500
Message-ID: <36pjkkF3s4cf8U1_at_individual.net>


<lauri.pietarinen_at_atbusiness.com> wrote in message news:1107793230.717306.130550_at_g14g2000cwa.googlegroups.com...
> Alan wrote:
>
> "the value of any attribute in a tuple must be a single value from
> the domain of that attribute"
>
> Please read carefully the above snip from your quotation.
>
> If the domain in question happens to be the {set of all fingerprints}
> or
> the {set of all blueprints for jumbo jets}, then, indeed, without
> violating this restriction in any way we can save, in one attribute, a
> *single* fingerprint (but not two) or a *single* jumbo jet
> blueprint (but not two).
>
> Technically, a domain could consist of relation values, so then we
> would have RVAs within the same framework, but I am not going to
> go that far...
>
> regards,
> Lauri Pietarinen
>

Fingerprints is an interesting example, and if done properly, is easily in 1NF (and 3NF):

FINGERPRINTS(person_id(PK), lh_thumb, lh_f1, lh_f2, lh_f3, lh_f4, rh_thumb, etc...)

Each fingerprint (lh_f1, lh_f2, etc) is atomic. The tuple contains atomic values. It is in 1NF No problem at all. Now, if you were modeling it incorrectly:

FINGERPRINT(person_id, prints(1...10)) Then you have a problem. You are NOT in 1NF, because prints is not atomic. It is an array containing 10 distinct atomic pieces of data.

Airplane blueprints is the same example, just MUCH larger. Not being familiar with the industry, I can provide a simple example:

AIRPLANE_BLUEPRINTS(print_id(PK), airplane_model, left_wing, wight_wing, fuselage, tail, passenger_comaprtment,
bomb_compar_er_I_mean_baggage_compartment...)

I've posted this in two threads already, but just in case you don't read it...

From "Fundamentals of Database Systems, Third Edition", Elmasri/Navathe, pages 485-487 Addison-Wesley, 2000:

"First normal form (1NF) is now considered to be part of the formal definition of a relation in the basic (flat) relational model (Footnote 11: This condition is removed in the nested relational model and in object-relational systems (ORDBMSs), both of which allow unnormalized relations.); historically, it was defined to disallow multivalued attributes, composite attributes, and their combinations. It states that the domain of an attribute must include only atomic (simple, indivisible) values and that the value of any attribute in a tuple must be a single value from the domain of that attribute. Hence, 1NF disallows having a set of values, a tuple of values, or a combination of both as an attribute value for a single tuple. In other words, 1NF disallows "relations within relations" or "relations as attributes of tuples." The only attribute values permitted by 1NF are single atomic (or indivisible) values. ... The first normal form also disallows multivalued attributes that are themselves composite. These are called nested relations because each tuple can have a relation within it..." Received on Mon Feb 07 2005 - 17:34:27 CET

Original text of this message