Re: Primary Key vs. UQ Index

From: Lawrence James <James.Lawrence_at_epamail.epa.gov>
Date: Mon, 28 Nov 1994 16:35:32 GMT
Message-ID: <James.Lawrence.26.00109818_at_epamail.epa.gov>


In article <3ar8s4$j02_at_abacus.tis.tandy.com> bpearc1_at_abacus.tis.tandy.com (Byron Pearce) writes:>From: bpearc1_at_abacus.tis.tandy.com (Byron Pearce)
>Subject: Primary Key vs. UQ Index
>Date: 21 Nov 1994 23:01:24 GMT
 

>Which is the more accepted method for enforcing a UNIQUE primary key:
>the use of the PRIMARY KEY constraint or the use of a UNIQUE index
>on the primary key field(s)? I can see pros and cons (such as being
>able to control extent size and spread i/o by placing the tables and
>indexes on different disks -- something you cannot do with a PRIMARY
>KEY).
Check your SQL reference manual, you can specify tablespace and storage clauses with both the unique and primary key constraints via the 'using index' clause. Both work via the unique index so the rational for one over the other is just logical. IE An employee id is a primary key, the SSN is unique.

Lawrence...... Received on Mon Nov 28 1994 - 17:35:32 CET

Original text of this message