Re: Primary Keys

From: <flemir_at_tdbank.ca>
Date: 1995/05/04
Message-ID: <3ob237$foq_at_inforamp.net>#1/1


In comp.databases.oracle gordonh_at_acslink.net.au (Gordon Hooker) said:  

>
>Although a unique index does not allow duplication of a row in the table
 based
>on that key, it quite different to a Primary Key. A primary key is a
 conceptual
>object used to enforce referential integrity. A unique index is a physical
 

>object used to enforce the PK or a Uniqueness constraint.
>

I am getting confused between the merits of primary keys and unique index. In an Oracle course I took, the instructor recommended using primary keys rather than unique indexes and the Oracle7 Server Administrator's Guide says "it is better to create constraints to enforce uniqueness than it is to use the CREATE UNIQUE INDEX syntax". Somewhere else implied that CREATE UNIQUE INDEX was an obsolete term. However, other people seem to recommend using UNIQUE INDEX. For our Information Warehouse system, we do not plan to use referential integrity since the data is read-only and will be validated prior to being loaded into the warehouse. We are using Direct Path Loads and therefore, need to drop indexes and disable constraints prior to loading. What looks to be the better approach - DEFINE PRIMARY KEY or CREATE UNIQUE INDEXES.

-- 
Rosemary Fleming 
Database Administration 
Toronto Dominion Bank 
 
The opinions expressed is not necessarily the ones of my employer 
Received on Thu May 04 1995 - 00:00:00 CEST

Original text of this message