Received: from bast.unixathome.org (bast.unixathome.org [216.187.105.150]) by postgresql.org (Postfix) with ESMTP id E23964794BF for ; Mon, 15 Apr 2002 16:02:45 -0400 (EDT) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 9BCD93F28 for ; Mon, 15 Apr 2002 16:04:05 -0400 (EDT) From: "Dan Langille" Organization: DVL Software Limited To: "Postgres Admin List" Date: Mon, 15 Apr 2002 16:02:44 -0400 MIME-Version: 1.0 Subject: Re: string PK vs. interger PK Reply-To: dan@langille.org In-reply-to: References: <019201c1e4af$3b855c90$de138f80@virginia.edu> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-Id: <20020415200405.9BCD93F28@bast.unixathome.org> X-Archive-Number: 200204/139 X-Sequence-Number: 4027 On 15 Apr 2002 at 14:20, Nick Fankhauser wrote: > As a general rule, a primary key (or any relationship key) should not > contain a value that means something beyond its use in relating entities. > The problem is that if a field describes an object, the day may come when > you want to change the description, but you *never* want to change the > field that identifies the record and relates it to other records. FWIW, I would recommend not using business values as a primary key (and by extension, as a foreign key). Business values are just that: business values. Sure, put unique constraints on business values if you want. Just don't make them a primary key or a foreign key. -- Dan Langille The FreeBSD Diary - http://freebsddiary.org/ - practical examples