Re: functional dependencies

From: Rohan Hathiwala <rp_hathiwala_at_yahoo.com>
Date: 12 Jun 2003 22:57:01 -0700
Message-ID: <3ec1cded.0306122157.3026c93a_at_posting.google.com>


Dear Andre and Larry,

   Larry this is the definition that I 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]"

and this is what you gave

"If there exists a tuple t1 in R with attributes A and B, and a functional dependency exists A-->B, then it is not possible for tuple t2 to exist in R where t1[A] = t2[A] and t1[B] != t2[B]"

If you look at it carefully our definitions are one and the same. All my def. says that for A->B t1[A] = t2[A] then we "must have" t1[B] = t2[B].
and what you say is that for t1[A] = t2[A] we cannot have t1[B] != t2[B].

And Andre I would like to thank you for bringing up the point that the definition does not say that the two tuples be distinct. The word "distinct" had been popping in my head all this while I just wanted to know what would happen if we also consider the case that the two tuples were distinct and then we make the atttribute which functionally determines the other a primary key. However I have got a clear picture now which is that if we have an FD which involves a non-prime attributes then there is scope for normalization there and we normalize the database and end up actually making the attribute a primary key. I have had a lot of fun discussing this topic with you guys and I like to thank both of you. Larry I wanted to know which UC are you from and what program are you into. Also Andre I would like to know about you too.

Regards,
Rohan.

Guillermo Labatte <labatteg_at_yahoo.com> wrote in message news:<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 Fri Jun 13 2003 - 07:57:01 CEST

Original text of this message