Re: Functional Dependency to constrain a relation to exactly one element?
From: Marshall <marshall.spight_at_gmail.com>
Date: 30 Sep 2006 23:30:05 -0700
Message-ID: <1159684205.456377.12630_at_i42g2000cwa.googlegroups.com>
Date: 30 Sep 2006 23:30:05 -0700
Message-ID: <1159684205.456377.12630_at_i42g2000cwa.googlegroups.com>
vc wrote:
> Jan Hidders wrote:
> > Marshall wrote:
> [...]
> > > Is it possible to have a functional dependency that will constrain
> > > R to *exactly* one row?
> [...]
> > > 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.
>
> What simple existential statement do you have in mind ?
If we want to ensure that relation R has at least one
element, *any* existential constraint on R will do it.
The existential constraint on R that binds no variables to
the empty expression would do it.
Marshall