Re: Union / set difference problem

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Wed, 28 Nov 2001 07:47:47 GMT
Message-ID: <3C049698.DE61C8E7_at_earthlink.net>


Enrico Sanchez wrote:

> I am trying to solve the following problem within database theory:
>
> Decide if the following 2 statements are valid:
> 1) if A and B are superkeys for R then A U (B-A) is a superkey for R
> 2) the intersection of two (distinct) superkeys for R is always a candidate
> key for R
>
> I'm lost. Can anyone give me a hint on how to solve this?

Homework?

Since A U (B-A) is the same as A U B, and both A and B are superkeys, I think A U (B-A) must also be a superkey.

How distinct are the two distinct superkeys? If they are disjoint, then the intersection is the empty set, and the empty set is not usually a candidate key of a table (and is never a CK of a table with other CKs). If the superkeys have at least one column that is different, then I don't see how the intersection of the two is reliably a CK, not least because of the reductio ad absurdam type argument when the two keys are totally disjoint. So I would be extremely dubious about the second proposition, but I don't think I've even informally proved it.

--
Jonathan Leffler (jleffler_at_earthlink.net, jleffler_at_informix.com)
Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>
Received on Wed Nov 28 2001 - 08:47:47 CET

Original text of this message