Re: Enforcing functional dependecy constraints

From: paul c <toledobythesea_at_oohay.ac>
Date: Wed, 07 Dec 2005 18:04:10 GMT
Message-ID: <uuFlf.66633$Gd6.40255_at_pd7tw3no>


David Cressey wrote:
> "x" <x_at_not-exists.org> wrote in message
> news:dn1j2m$fpo$1_at_domitilla.aioe.org...
>

>>Hi !
>>
>>Since this is a database theory group and  I'm bored by the null and 3vl
>>threads I ask yet another elementary question:
>>
>>Suppose you have this relation R(A,B,C) with the following functional
>>dependencies AB->C and C->B.
>>What is the best way to implement this in available SQL DBMS in your

>
> opinion
>
>>?
>>
>>Regards,
>>x
>>

>
> I'm not sure what you mean by "best". If it's my opinion of "what's best",
> I'm going to dodge the question by giving the universal answer: "It
> depends".
>
> But before we move from relations to SQL, maybe we could discuss a little
> normalization:
>
> You could decompose the relation R(A,B,C) into two relations S(A,C) and
> T(C,B).
>
> Please bear with me for presenting relation T in a curious order. These
> two can be recombined, unless I miss my guess,
> back into R(A,B,C) without loss.
 > ...

AB->C and C->B (given)

=> ABC->BC (composition)
=> A->BC (reflexivity)
=> A->C (decomposition)

So if I did that right, I think S and T are in a pretty high normal form. But the last decomposition step above also implies A->B, so we could equally get away with relations S(A,B) and T(C,B).

Of course, the last time I tried to do FD's here, I think I might have misread the OP's question so maybe I'm about to get nailed again.

p Received on Wed Dec 07 2005 - 19:04:10 CET

Original text of this message