Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: 4NF is Where It Is At! [WAS Re: 1:1 relationships]

Re: 4NF is Where It Is At! [WAS Re: 1:1 relationships]

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 30 Jan 2001 09:54:13 GMT
Message-ID: <956305$eqj$1@news.tue.nl>

Barry wrote:
> Jan Hidders wrote:
> > Barry wrote:
> > > Jan Hidders wrote:
> > > > Barry wrote:
> > > > >
> > > > > The classic example used to be
> > > > > lives_at( person ) -> current_address
> > > > > and
> > > > > lives_at( person ) -> current_home_ph#
> > > > > but
> > > > > lives_at( person ) -/-> current_salary
> > >
> > > I'd intended {person} as the candidate key, and (unstated)
> > >
> > > earns( person ) -> current_salary
> >
> > [...] So, if earns( person ) current_salary holds then your example
> > -> has the candidate key {person} and is therefore already in 4NF
>
> Doesn't having current_address and current_salary violate your definition
> of 4NF given earlier in the thread as:
>
> 4NF: A relation is in 4NF if it holds for every
> non-trivial multi-valued dependency X->>Y
> that X is a candidate key
>
> I'm thinking here that multiple people from different addresses might
> have the same current_salary ... and I never said :-) that
> co-residents could *not* work at the same company earning different
> salaries. So now I have current_address ->> current_salary *but*
> current_address is *not* a Candidate Key. And a case could also be
> made for the reverse.

Yes, but these are all not multi-valued dependencies. You seem to think that X->>Y means that there can be multiple Ys associated with an X, but that is not the correct definition. The correct definition says that with every X there should be a set of Ys associated that is *independent* of the other attributes (i.e. not in X or Y).

The standard example would be Roster(Class, Student, Course). With every class there is a set of students associated, independent of which course the class is following. The consequence is that if you see a tuple (C3, "John", "DB.101") and a tuple (C3, "Mary", "AUT.201") then you know that the table will also contain (C3, "Mary", "DB.101") and (C3, "John", "AUT.201"). The reason for this is quite simple: if a student in a certain class follows a certain course then everybody in that class will follow that course.

So, if you say that current_address ->> current_salary then you claim that there is a set of salaries associated with an address independent of the other attributes person and current_home_ph#. That means that every person living at that address has the same set of salaries. I don't think that is really true. :-)

-- 
  Jan Hidders
Received on Tue Jan 30 2001 - 03:54:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US