Re: Functional Dependency to constrain a relation to exactly one element?

From: Marshall <marshall.spight_at_gmail.com>
Date: 30 Sep 2006 13:14:23 -0700
Message-ID: <1159647263.889150.156350_at_i42g2000cwa.googlegroups.com>


Jan Hidders wrote:
> Marshall wrote:
> > It's easy enough to describe a functional dependency that will
> > constrain
> > a relation to having at most one row; it is any functional dependency
> > for which the determinant set is empty.
>
> Yep.
>
> > Is it possible to have a functional dependency that will constrain
> > R to *exactly* one row?
>
> No. The empty relation satisfies all FDs.

Oh my, that is certainly obvious now that you point it out. Thanks.

In fact, the empty relation satisfies all forall constraints of whatever type.

> > If it can't be done with an FD, can we do it with a constraint?
>
> Of course. In first-order logic you can specify this (i.e. that there
> is at least one tuple in the relation) with a simple existential
> statement.

Well. Two forehead-slapping answers in one post. Ahem.

Again, thanks.

Marshall Received on Sat Sep 30 2006 - 22:14:23 CEST

Original text of this message