Re: thinking about UPDATE

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Fri, 23 Jul 2004 18:48:23 GMT
Message-Id: <pan.2004.07.23.18.49.12.482009_at_REMOVETHIS.pandora.be>


On Fri, 23 Jul 2004 15:57:34 +0000, Marshall Spight wrote:
> "Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message
> news:pan.2004.07.23.08.58.40.657256_at_REMOVETHIS.pandora.be...

>>
>> Note that in practice you would probably not include such columns
>> because they are obviously redundant.

>
> I'm not sure I agree with that. Part of the value of time-varying
> relations is the "time-varying" part. That is to say, {} as a key gives
> us the ability to have a singleton in the relational world, and that is
> a very powerful pattern. The variable is still useful as a variable,
> even though the cardinality is limited to 0 or 1.

With "such columns" I meant columns that are restricted to at most one value but are in a relation where there can be more than one tuple. You are right that if all columns are restricted that way then there is no redundancy. Although some participants of this newsgroup might disagree. ;-)  

> (Are there other tricks we can play to constrain the cardinality of a
> relation? Can we constrain the cardinality to exactly 1? 1 or more?)

Not with FDs, MVDs or JDs.   

>> Actually, theory says the same because the relation would not be in 3NF
>> (or even 2NF).

>
> Ouch! That doesn't seem right. (But of course, intuition is not a great
> guide here.) Time for some more research.

It all works out fine. Suppose we have R(a,b,c) and {}->{a,b,c} then this is fully normalized. No problem. It ain't broken, don't fix it. But suppose we have only {}->{c} then .... well? :-)

  • Jan Hidders
Received on Fri Jul 23 2004 - 20:48:23 CEST

Original text of this message