Re: surrogate key or not?

From: Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Cc: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: surrogate key or not?
Date: 2004-07-23 09:00:10
Message-ID: 0407231430101G.01150@thenilgiris.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Friday 23 July 2004 03:29 pm, Michael Glaesemann wrote:

>
> You appear to be misunderstanding the purpose of a primary key. A
> primary key is used to ensure there is a way to identify each row
> uniquely. It is quite independent of which columns you may or may not
> want to search on. If name is not going to be necessarily unique in the
> table, it isn't a primary key.

ive not misunderstood anything. this is one of the tables in question:

address_type
id serial PRIMARY KEY
name text UNIQUE NOT NULL

i think it is self explanatory

--
regards
kg

http://www.onlineindianhotels.net - hotel bookings reservations in over 4600
hotels in India
http://www.ootygolfclub.org

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2004-07-23 09:59:33 Re: surrogate key or not?
Previous Message Kenneth Gonsalves 2004-07-23 07:57:46 Re: surrogate key or not?