Re: functional dependencies

From: Guillermo Labatte <labatteg_at_yahoo.com>
Date: Thu, 12 Jun 2003 08:38:08 -0300
Message-ID: <pan.2003.06.12.11.38.04.386977.6374_at_yahoo.com>


On Thu, 12 Jun 2003 03:48:26 -0300, Rohan Hathiwala wrote:

> Dear Andre and Larry,
> Larry, let me quote a few lines from your recent posting.
>
> "Yes, the primary key, by definition functionally determines
> all non-key attributes in the tuple. The same is true for any
> candidate key, not just the primary key."
>
> That is precisely what I am having trouble with. As I see it both
> functional dependencies and primary keys are seperate integrity
> constraints.

They are not. Primary (or candidate) keys are just special cases of FDs.

> So if in a FD say A -> B if we make A a primary key the
> whole thing degenerates to a primary key constraint and according to me
> it does not remain a FD anymore.

But not according to everyone else.

> because by definition of FD we can have
> two tuples t1 and t2 with t1[A] = t2[A] but if A is primary key this
> will never happen. To make it more clear I have trouble accepting that a
> primary key functionally determines all non-key attributes.

Lets revisit the definition you gave

"In a relation R if we have 2 attributes A and B and suppose an FD exists i.e A -> B then for any two tuples t1 and t2 in R if t1[A] = t2[A] the we must have t1[B] = t2[B]"

The definition says "for any two tuples t1 and t2 in R", but it does not require that these two tuples be distinct, so the definition includes those cases in which t1 = t2. So if A is primary key, you will find that t1[A] = t2[A] is true when t1 = t2. Received on Thu Jun 12 2003 - 13:38:08 CEST

Original text of this message