Re: constraints in algebra instead of calculus
From: paul c <toledobythesea_at_oohay.ac>
Date: Mon, 21 May 2007 04:14:42 GMT
Message-ID: <S094i.202650$aG1.37583_at_pd7urf3no>
>> Okay, a while back we were talking about writing constraints
>> in a language with aspects of the relational calculus, specifically
>> the existential and universal quantifiers. The point was made
>> that that's unnecessary; the calculus is no more expressive
>> than the algebra.
>>
>> So it ought to be possible to write any constraint from the
>> calculus in the algebra.
>>
>> Well, I'm having a hard time figuring out how to do it. Can
>> anyone help?
>>
>> How does one write a functional dependency in the algebra?
>> A foreign key?
>>
>>
>> Marshall
>>
Date: Mon, 21 May 2007 04:14:42 GMT
Message-ID: <S094i.202650$aG1.37583_at_pd7urf3no>
paul c wrote:
> Marshall wrote: >
>> Okay, a while back we were talking about writing constraints
>> in a language with aspects of the relational calculus, specifically
>> the existential and universal quantifiers. The point was made
>> that that's unnecessary; the calculus is no more expressive
>> than the algebra.
>>
>> So it ought to be possible to write any constraint from the
>> calculus in the algebra.
>>
>> Well, I'm having a hard time figuring out how to do it. Can
>> anyone help?
>>
>> How does one write a functional dependency in the algebra?
>> A foreign key?
>>
>>
>> Marshall
>>
> > I thought that one was easy, if FK is the set of 'foreign key' > attributes and A is the 'referencing table' and using an op like D&D > <AND>, then it's something like A{FK} <AND> B{FK} = A{FK}. (I like this > one because it's particularly easy to implement.) >
As for the FD, I think it usually requires <RENAME> as well. Received on Mon May 21 2007 - 06:14:42 CEST