On Tuesday 10 Jan 2006 9:51 am, Mike wrote:
> but necessary enough. The point I was making was, what's the
> difference between a primary key vs. any other unique field?

database design mandates that every row in a table must be unique. 
Where there is a serial data type as the primary key, this holds 
good even if every row was identical except for the serial id 
field. This would be bad design. Therefore, for every table one has 
to identify one row, or a combination of rows that has to be 
unique. There are two approaches to this problem - one is to make 
the unique field or combination of fields the primary key, and 
specify the id field to be unique. The other way is the opposite. 
And there is a never ending battle between proponents of 'natural' 
primary keys and 'surrogate' primary keys.

-- 
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Reply via email to