Re: What to call this operator?

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Sun, 03 Jul 2005 13:22:09 GMT
Message-ID: <5ERxe.136274$up5.7265294_at_phobos.telenet-ops.be>


Marshall Spight wrote:
> Jan Hidders wrote:

>>Marshall Spight wrote:
>>
>>The rule is that if we take the natural join of R and S then we can
>>derive a candidate key K for the result if K is a candidate key of both
>>R and S. Is that what you wanted to hear?

>
> That seems correct but incomplete. If R(a, b) and S(b, c) and b
> is non-empty, and (a) is a candidate key of R, then it seems
> that (R join S) will also have (a) as a candidate key. Wouldn't
> it?

Nope. Consider: R(a, b) = { (1, 2) } and S(b, c) = { (2, 3), (2, 4) }.

> We also need some kind of fallback rule, such that if we cannot
> derive any keys for the relation, then the union of all columns
> is a key.

Indeed. Of course the situation gets much interesting if you also take other constraints into account such as functional dependencies.

  • Jan Hidders
Received on Sun Jul 03 2005 - 15:22:09 CEST

Original text of this message