Re: Constraints and Functional Dependencies

From: Marshall <marshall.spight_at_gmail.com>
Date: 28 Feb 2007 09:34:02 -0800
Message-ID: <1172684041.794087.32540_at_p10g2000cwp.googlegroups.com>


On Feb 28, 8:00 am, "Walt" <wami..._at_verizon.net> wrote:
> "Marshall" <marshall.spi..._at_gmail.com> wrote in message
>
> news:1172367854.472739.82840_at_t69g2000cwt.googlegroups.com...
>
>
>
> > On Feb 24, 10:46 am, paul c <toledobythe..._at_oohay.ac> wrote:
> > > mAsterdam wrote:
> > > > paul c wrote:
>
> > > >> Marshall wrote:
>
> > > >>> ...
> > > >>> With such a system, a relation R with attribute a (which I will
> > > >>> write as R(a)) having a as a foreign key into S(b) is expressed
> > > >>> as follows:
>
> > > >>> forall R(a): exists S(b): a = b
>
> > > >>> So we can express foreign keys this way.
> > > >>> ...
>
> > > >> I presume that if S had other attributes besides b, this definition
> > > >> would mean that b doesn't need to be a so-called primary key? (That
> > > >> would be okay with me.)
>
> Excuse me. b doesn't even need to be a candidate key for S. Your
> constraint says that there exists at least one S(b) such that a = b, but
> you haven't said that there exists not more than one S(b). In particular,
> if there are other attributes in S, b might not be a candidate key, but
> still satisfy the referential integrity rule you've given.
>
> Or am I misreading something?

That sounds exactly right to me.

Although, again, in practice it is likely that b will be a candidate key.

Marshall Received on Wed Feb 28 2007 - 18:34:02 CET

Original text of this message