From: Kenneth Gonsalves <lawgon@thenilgiris.com>
To: Josh Berkus <josh@agliodbs.com>
To: David Garamond <lists@zara.6.isreserved.com>
To: pgsql-sql@postgresql.org
Subject: Re: surrogate key or not?
Date: Sat, 7 Aug 2004 09:30:30 +0530
Message-ID: <0408070930300J.01190@thenilgiris.com> (raw)
In-Reply-To: <200408061542.04336.josh@agliodbs.com>
References: <1090325769.3241.27.camel@dicaprio.akademie1.de>
<41026D55.3040002@zara.6.isreserved.com>
<200408061542.04336.josh@agliodbs.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lawgon@thenilgiris.com, josh@agliodbs.com, lists@zara.6.isreserved.com
Subject: Re: surrogate key or not?
In-Reply-To: <0408070930300J.01190@thenilgiris.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox