Re: rookie to gurus: transitive?

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 26 Feb 2001 14:20:42 GMT
Message-ID: <97donq$ibo$1_at_news.tue.nl>


David Cressey wrote:
>
> A section of a course is taught by a professor. A professor has an office
> phone.
>
> Now the question is, does the office phone number belong in the record
> (row, excu-u-u-u-se me) that describes the course section?

Er, "tuple" if you *really* want to be pedantic about these things. :-P

> For now, let me make the assumption that professors can be identified
> by name, without causing problems. This is a bad idea, but that's
> another story.
>
> Well, if the course section has a key (maybe course ID and section
> number, and the professor is listed in the record and the phone
> number is in there as well, so as to make it easy to print the course
> roster, we have the set up.
>
> Phone number is functionally dependent on the whole key.

So the whole key is {prof-name, course-id, section#}?

> But it's also dependent on the professor. The professor, in turn, is
> dependent on the key. That's a transitive dependency.

If the whole key contains prof-name then strictly speaking it isn't. It would have been if { prof-name } was not a subset of the key. This example is already dealt with in 2NF where you remove FDs that start in a subset of a key.

> A better plan is to have a separate set of records (table,
> excu-u-u-se me) that describe professors.

There's a thought: the tablational model. :-)

Oh dear. I think I better duck now.

-- 
  Jan Hidders
Received on Mon Feb 26 2001 - 15:20:42 CET

Original text of this message