pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Gonsalves <lawgon@thenilgiris.com>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: surrogate key or not?
Date: Fri, 23 Jul 2004 14:30:10 +0530
Message-ID: <0407231430101G.01150@thenilgiris.com> (raw)
In-Reply-To: <FF7F62AC-DC8E-11D8-AA48-000A95C88220@myrealbox.com>
References: <1090325769.3241.27.camel@dicaprio.akademie1.de>
	<0407231327461F.01150@thenilgiris.com>
	<FF7F62AC-DC8E-11D8-AA48-000A95C88220@myrealbox.com>

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



view thread (44+ messages)  latest in thread

Message-ID: <0407231430101G.01150@thenilgiris.com>
Permalink:  ../0407231430101G.01150@thenilgiris.com/
Also on:    postgresql.org/message-id/0407231430101G.01150@thenilgiris.com

 · 

reply

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, grzm@myrealbox.com, Karsten.Hilbert@gmx.net
  Subject: Re: surrogate key or not?
  In-Reply-To: <0407231430101G.01150@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