Re: No exceptions?
- From: Jonathan Leffler <jleffler@xxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 06:35:39 GMT
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>
Email: jleffler@xxxxxxxxxxxxx, jleffler@xxxxxxxxxx
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
.
- Follow-Ups:
- Re: No exceptions?
- From: J M Davitt
- Re: No exceptions?
- References:
- No exceptions?
- From: paul c
- Re: No exceptions?
- From: Bob Badour
- Re: No exceptions?
- From: paul c
- Re: No exceptions?
- From: J M Davitt
- Re: No exceptions?
- From: paul c
- Re: No exceptions?
- From: J M Davitt
- Re: No exceptions?
- From: paul c
- Re: No exceptions?
- From: Bob Badour
- Re: No exceptions?
- From: paul c
- Re: No exceptions?
- From: Bob Badour
- Re: No exceptions?
- From: J M Davitt
- No exceptions?
- Prev by Date: Re: No exceptions?
- Next by Date: Re: No exceptions?
- Previous by thread: Re: No exceptions?
- Next by thread: Re: No exceptions?
- Index(es):
Relevant Pages
|
|