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 -> Re: Difference of Primary key & Unique Indexes...

Re: Difference of Primary key & Unique Indexes...

From: Phil Bradley <pbradley_at_pacific.net.sg>
Date: 1998/01/04
Message-ID: <34AFDDFF.6E811B92@pacific.net.sg>#1/1

cucu_at_nongae.gsnu.ac.kr wrote:

> Hi everybody...
>
> I'd like to know the difference of Primary Key and Unique Index.
> (PK : Primary Key, UI : Unique Index )

They are logically the same. The relational model talks about candidate keys. A candidate key is any combination of columns that gaurantees to uniquely identify a single row. Any PK or UI is a candidate key.

> Is there any difference of performance PK and UI?
> or
> what's the particular difference of PK and UI?

The difference between PK and UI is in the RDBMS implementation. To the best of my knowledge most RDMS's automatically generate indexes based on the primary key. Hence foreign key references based on the PK should be much faster.

>
>
> Thanks in advance and mail me.
>
> ksjune_at_sys.gsnu.ac.kr
Received on Sun Jan 04 1998 - 00:00:00 CST

Original text of this message

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