Re: Little design mistakes that can be easily avoided (2): Listenning to CELKO (and CELKO alikes)

From: Marshall <marshall.spight_at_gmail.com>
Date: 27 May 2007 08:53:57 -0700
Message-ID: <1180281237.430387.145710_at_r19g2000prf.googlegroups.com>


On May 27, 5:58 am, "David Cressey" <cresse..._at_verizon.net> wrote:

>

> I differ with the wording above. Here's an alternate wording: if you have
> a relation, the tuples will be distinct, by definition. This means that the
> entire tuple is either a candidate key or a super key. To discover
> candidate keys, one merely needs to discover the constraints placed on the
> data.

Yeah, I was thinking about that the other day. I am used to saying "there is always a key constraint" but maybe that's a bit of a simplification.
The definition of relation, join, union, etc. do not admit duplicates.

If we have relations A and B, then we know that A union B will not have duplicates. Not because of key enforcements necessarily, but because of the definition of join.

If insert A into B is defined as rebinding B with A union B, then we can also be certain that B has no duplicates, both before and after we insert A. This is true even if we don't have an explicit constraint on B.

Another way to say it: the set of all attributes of a relation is a superkey, regardless of whether an explicit constraint that says as much exists or not.

A small point perhaps.

Marshall Received on Sun May 27 2007 - 17:53:57 CEST

Original text of this message