| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Modeling Address using Relational Theory
"dawn" <dawnwolthuis_at_gmail.com> wrote in message
news:1125428483.999833.250400_at_g43g2000cwa.googlegroups.com...
> Marshall Spight wrote:
> > Gene Wirchenko wrote:
> > > On 29 Aug 2005 20:49:44 -0700, "dawn" <dawnwolthuis_at_gmail.com> wrote:
> > > >
> > > >I understand the Line1, Line2, Line3 implementation, but any model
with
> > > >those attributes screams "this model is not relational", right? I am
> > >
> > > No. It is not 1NF if the attributes can have other than one
> > > value, but the names are irrelevant except that they be unique within
> > > the relation.
> >
> > Agreed. Line1 and Line2 are not two interchangable instances of
> > the same kind of thing; they are specific distinct fields. It
> > is not a repeating group.
>
A long, long time ago, I asked you whether a pizza with onions and mushrooms is the same thing as a pizza with mushrooms and onions. If you had thought about the implications of that question, you would have the answer to the question that is before you now.
Major1, Major2, Major3 are just names. What's in a name? The question is whether or not they form a set of majors, at the rock bottom semantic level. Let's take Course1, Course2, Course3, because it's easier to see that they are a set, and not a list.
At the rock bottom level, a student enrolled in Psych101, Calculus101, English101, and Programming101 is still enrolled in the same courses if one permutes the order. Disguising this set as attributes (columns) with different names is obfuscating the fact that they are a set.
That obfuscation is going to come back to bite you when you make queries that should yield the same result regardless of permutation in the set of courses a student is enrolled in. By creating a separate relation, listing Student_id and Course_id, you make it trivial to make those queries invariant to permutation of order in the set.
And that's the real point behind normalization. It isn't some mumbo jumbo you have to go through in order to satisfy the Spanish inquisition about the orthodoxy of your faith. It's a way of preventing certain problems that will come up at access time or at update time if you depart from the normal forms. For each normal form, there is a clear outline of the access anomalies or the update anomalies you will encounter if you depart from that form.
If you are willing to deal with those problems, departure from a given level of normalization isn't necessarily "bad design".
It's they people who don't understand the consequences of departure from the forms, and then keep moaning "why do these things keep happening to me?" whenever they build a relational database, that are creating bad designs. Received on Wed Aug 31 2005 - 04:38:01 CDT
![]() |
![]() |