Re: Primary key on one or two fields

From: Anith Sen <anith_at_bizdatasolutions.com>
Date: Thu, 14 Aug 2003 21:02:30 GMT
Message-ID: <GNS_a.99117$3o3.6880687_at_bgtnsc05-news.ops.worldnet.att.net>


Joe,

Just because it is allowed by SQL-92 does not make it logically correct. If you look at the Foobar examples you posted, they are all under-normalized
(specifically, they are not in 2NF) and suffer from obvious update

anomalies. In a well designed schema, DEFAULTs have no place as a value for a key.

The single row UniversalConstants table is a well-known kludge, which does not prove the need for defaults on the keys. It simply shows the INSERT statement without typing up all the values. I would be interested in seeing a real world scenario which demands the logical design to have a DEFAULT on a key.

-- 
- Anith

( Please reply to newsgroups only )
Received on Thu Aug 14 2003 - 23:02:30 CEST

Original text of this message