Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Primary Key vs Unique Key

Primary Key vs Unique Key

From: Chapman Keyes <chapman_at_teoco.com>
Date: 21 May 2001 11:38:16 -0700
Message-ID: <a80c63.0105211038.323261bb@posting.google.com>

Greetings!

     Please help me understand the practical differences on the db side between creating indices as Primary Keys vs. Unique Keys on the same columns. The reason I ask is that when we create tables with the PK embedded, Oracle assigns a SYS_Cnnnnn index name, and those names differ from db to db, making direct changes to the PK's at our customer sites impossible.

     We do not have R.I., but might in the future. All our PK's are sequence ID's. I understand the value of PK's in data modeling, but ERwin allows us the option of creating the tables in ERwin with the PK's (which allows click-and-click FK creation) and then generating the SQL either with the PK embedded in the CREATE TABLE, or with separate CREATE UNIQUE INDEX XPKtablename scripts that allow us to maintain identical index names across all our db's.

     So, does the db (Oracle) itself care whether a column is indexed as PK or UK? If so, under what conditions? Thanks! Received on Mon May 21 2001 - 13:38:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US