X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AAE075E46C5 for ; Sat, 7 Aug 2004 03:03:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08773-08 for ; Sat, 7 Aug 2004 06:03:28 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id F1B9F5E476B for ; Sat, 7 Aug 2004 02:48:10 -0300 (ADT) Received: from [61.1.218.202] (helo=thenilgiris.com) by sharp.noc24x7.com with asmtp (Exim 4.34) id 1BtK3u-0002WX-JA; Sat, 07 Aug 2004 11:18:12 +0530 Received: from localhost (localhost [[UNIX: localhost]]) by thenilgiris.com (8.11.2/8.11.2) id i7740Vp12121; Sat, 7 Aug 2004 09:30:31 +0530 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Gonsalves To: Josh Berkus , David Garamond , pgsql-sql@postgresql.org Subject: Re: surrogate key or not? Date: Sat, 7 Aug 2004 09:30:30 +0530 X-Mailer: KMail [version 1.2] References: <1090325769.3241.27.camel@dicaprio.akademie1.de> <41026D55.3040002@zara.6.isreserved.com> <200408061542.04336.josh@agliodbs.com> In-Reply-To: <200408061542.04336.josh@agliodbs.com> MIME-Version: 1.0 Message-Id: <0408070930300J.01190@thenilgiris.com> Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sharp.noc24x7.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - thenilgiris.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/46 X-Sequence-Number: 18543 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