Re: Surrogate primary key plus unique constraint vs. natural primary key: data integrity?

From: Harry Tuttle <SOZRBLNTLEEE_at_spammotel.com>
Date: Mon, 11 Mar 2013 08:48:12 +0100
Message-ID: <aq5gg2F56ioU1_at_mid.individual.net>


Wolfgang Keller, 08.03.2013 23:11:
>> (a) there's no such thing as a primary key;
>
> PostgreSQL seems to think differently. >;->
>
> It requires definition of a primary key afaik.

No it doesn't.

You can have a unique constraint without having a primary key (and you can have a FK to that unique constraint)

The only way the SQL database differ is how they treat NULL values if the unique constraint is made of nullable columns. Received on Mon Mar 11 2013 - 08:48:12 CET

Original text of this message