Re: Primary Key vs. UQ Index

From: Lon Culbertson <culberts_at_netcom.com>
Date: Thu, 15 Dec 1994 20:43:03 GMT
Message-ID: <culbertsD0vDJr.CtF_at_netcom.com>


John Malathronas (John_at_scroll.demon.co.uk) wrote:
: In article: <James.Lawrence.26.00109818_at_epamail.epa.gov> James.Lawrence_at_epamail.epa.gov (Lawrence
: James) writes:
: >
: > 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......
: >
: Note that you have to be careful in that a simple primary key constraint will
: create the index in the same tablespace as the data; you have more
: control when you huld a un ique index

     If one uses the "USING INDEX TABLESPACE index_ts" clause of the PRIMARY KEY constraint clause, one can place the index of a primary key in a different tablespace. Received on Thu Dec 15 1994 - 21:43:03 CET

Original text of this message