Re: IS it a good practice to use SERIAL as Primary Key?

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, John McCawley <nospam(at)hardgeus(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: IS it a good practice to use SERIAL as Primary Key?
Date: 2006-11-28 00:22:57
Message-ID: C190CF71.5C2EB%scott_ribe@killerbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> I promise I'm not trying to be a pain in the butt ;) Do you then use
>> your serial id as your foreign key in other tables, or the
>> firstname/lastname primary key?
>
> Now that is a good question. I would use the id, but that is not
> technically proper :).

But firstname/lastname is *NOT* a primary key. Merely calling it one in the
db schema does not make it so.

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 722-0567 voice

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2006-11-28 00:29:44 Re: IS it a good practice to use SERIAL as Primary Key?
Previous Message Ron Johnson 2006-11-28 00:14:02 Re: IS it a good practice to use SERIAL as Primary Key?