Re: Functional Dependency to constrain a relation to exactly one element?
From: J M Davitt <jdavitt_at_aeneas.net>
Date: Sun, 01 Oct 2006 16:51:26 GMT
Message-ID: <imSTg.6721$OE1.4958_at_tornado.ohiordc.rr.com>
>
>
> Ah, of course, I see what you mean now.
>
> Well, we could always pair an empty determinant set FD with
> an empty existential constraint. Or, given a candidate key k
> of relation R, we could perhaps say
>
> exists R.k: forall R.k': k = k'
>
> (using x' to indicate a different binding of attribute x)
>
> Of course, you could make a good case that the above
> isn't "simple".
Date: Sun, 01 Oct 2006 16:51:26 GMT
Message-ID: <imSTg.6721$OE1.4958_at_tornado.ohiordc.rr.com>
Marshall wrote:
> vc wrote:
>
>>Marshall wrote: >> >>>vc wrote: >>> >>>>Jan Hidders wrote: >>>> >>>>>Marshall wrote: >>>> >>>>[...] >>>> >>>>>>Is it possible to have a functional dependency > > [...] >>>>>>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. >> >>Right, but it was not your original question. You asked about a >>constraint "that will constrain R to *exactly* one row?". Clearly, >>"*any* existential constraint on R" won't do that.
>
>
> Ah, of course, I see what you mean now.
>
> Well, we could always pair an empty determinant set FD with
> an empty existential constraint. Or, given a candidate key k
> of relation R, we could perhaps say
>
> exists R.k: forall R.k': k = k'
>
> (using x' to indicate a different binding of attribute x)
>
> Of course, you could make a good case that the above
> isn't "simple".
Okay, the answer to the original question is, "No," in that FDs (and constraints) can limit a relation's cardinality to [0, 1]. Am I right in guessing that you want to know how to ensure that a given relation's cardinality is always 1?
I don't think FDs can help. So: we're left with INDs? Or something else?
[I say INDs because the MVD and JD concepts seem - how shall I say this? - not a solution. MVDs and JDs are very useful for evaluating a design, but I just don't think that 4NF and 5NF definitions are all that useful when conceiving a design.]
First question: does the empty relation satisfy all INDs, too? Received on Sun Oct 01 2006 - 18:51:26 CEST