Functional Dependency to constrain a relation to exactly one element?
Date: 30 Sep 2006 11:39:44 -0700
Message-ID: <1159641584.178435.298150_at_c28g2000cwb.googlegroups.com>
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.
In other words, for any relation R with set-of-attributes A, if you have a function dependency
{} -> any subset of A
then R may have at most one element.
Is it possible to have a functional dependency that will constrain R to *exactly* one row? I seem to remember Vadim saying it was possible to use FDs to enforce any cardinality bounds (upper and lower?) but I didn't understand it at the time, and I can't find it now.
(Alternatively, can we prove it can't be done with an FD?)
If it can't be done with an FD, can we do it with a constraint? Trivially we can do it with an aggregate constraint:
constraint(R.count() == 1)
but I'm curious if such a thing can be done without reference to an aggregate function.
I'm having a hard time thinking about this and any help is appreciated.
Marshall Received on Sat Sep 30 2006 - 20:39:44 CEST