Re: No exceptions?

From: Jonathan Leffler <>
Date: Fri, 30 Jun 2006 06:35:39 GMT
Message-ID: <%C3pg.319$>

J M Davitt wrote:
> Maybe a fine point, but...
> All the attributes in a relation comprise, at least, a superkey. The
> set of attributes that qualify as a candidate key must hold unique
> values and no subset of those attributes must hold unique values. The
> only relations that could have empty candidate keys are those with
> empty headings, right? (I remember puzzling this when I first
> encountered DEE and DUM.) If the heading is not empty, must a
> non-empty subset of those attributes be declared as a key?

No. A relation can have an empty set as its primary key, in which case that relation is constrained to have at most one row of data. This table might be the configuration data for an application, for example, containing the one-off constants that parameterize its behaviour. Things like the corporation name, US federal tax ID number, state of registration, etc.

Further, any other relation could reference the configuration data relation via a foreign key with an on delete cascade action. In that case, if you ever deleted the configuration data record, all the other tables (that reference it) in the database would be emptied - automatically.

Jonathan Leffler                   #include <disclaimer.h>
Guardian of DBD::Informix v2005.02 --
Received on Fri Jun 30 2006 - 08:35:39 CEST

Original text of this message