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: Constraints and Functional Dependencies

Re: Constraints and Functional Dependencies

From: Marshall <marshall.spight_at_gmail.com>
Date: 24 Feb 2007 08:13:21 -0800
Message-ID: <1172333601.148573.19370@v33g2000cwv.googlegroups.com>


On Feb 24, 6:41 am, paul c <toledobythe..._at_oohay.ac> 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.)

Yeah. You'd need another constraint to express that, and I don't think it would be possible to express the constraint that foreign keys must reference primary keys, because that would be a second order formula: it quantifies over formulas.

The system itself might have an implementation constraint, but off the top of my head I don't see why it would need one.

Of course, in practice I don't think one is likely to want to reference
anything that isn't a key.

Marshall Received on Sat Feb 24 2007 - 10:13:21 CST

Original text of this message

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