| From: | Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com> | 
|---|---|
| To: | Josh Berkus <josh(at)agliodbs(dot)com>, David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>, pgsql-sql(at)postgresql(dot)org | 
| Subject: | Re: surrogate key or not? | 
| Date: | 2004-08-07 04:00:30 | 
| Message-ID: | 0408070930300J.01190@thenilgiris.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
On Saturday 07 August 2004 04:12 am, Josh Berkus wrote:
>
> > Meanwhile, every other aspect of the data can change (e.g. a person can
> > change his name, sex, age, email, address, even date & place of birth).
> > Not to mention data entry mistakes. So it's impossible to use any
> > "real"/natural key in this case.
>
> Absolutely false.   It's quite possible, it's just a
> performance/schema/data management issue.  This also applies to my comment
> above.
why shouldnt the primary key change? the only key that should never change is 
a key that is used as a foreign key in another table. In a table like this:
id serial unique
name varchar primary key
name may change - id will never change. id is used as the foreign key
-- 
regards
kg
http://www.onlineindianhotels.net - fastest hotel search website in the world
http://www.ootygolfclub.org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kenneth Gonsalves | 2004-08-07 04:03:08 | reply to setting | 
| Previous Message | Tom Lane | 2004-08-06 22:52:57 | Re: Grouping by week |