Re: Primary Keys vs. Unique Index

From: Martin Farber <farber_at_nynexst.com>
Date: 14 Dec 1994 16:44:27 GMT
Message-ID: <3cn7db$6a_at_news.nynexst.com>


I think there are several reasons. First of all, a Foreign Key cannot reference a Unique Index - only a Primary Key of a Unique Constraint. I also remember reading *somewhere* that we should start using these new constructs because optimization was no longer going to consider Unique Indexes. Don't ask me what version current or future - I do not remember.

Perhaps some Oracle folks will give us the *real* poop!

Sincerely,

Martin Farber
Independent Oracle Consultant "A Jack of all trades and a slave to one."

                        |  NYNEX Science & Technology
                        |  500 Westchester Ave, Rm 1B-23
                        |  White Plains, NY  10604
                        |     -----------------
                        |  email: farber_at_nynexst.com
                        |  Voice: 914/644-2656
                        |    FAX: 914/644-2216

In article 1_at_corp02.d51.lilly.com, jl34778_at_corp02.d51.lilly.com () writes:
>In article <D0L50v.998_at_nntpa.cb.att.com>, lou2_at_cbnews.att.com (louis.avrami..jr) writes:
>> In the v7.1.3 Server Administrator's Guide, it's stated that it is
>> "better" to create an index via a PRIMARY KEY within a schema, than
>> via a CREATE UNIQUE INDEX statement. Is there a reason for this?
>> My group is just beginning to migrate to v7.1.3, and we have quite a
>> few schemas that would need extensive updating, as well as processes
>> like maintenance and data loads that would need to be rethought, with
>> PRIMARY KEY indexes.
>>
>> Thanks,
>>
>> Lou Avrami ( attmail!lavrami )
>>
>
>My thinking is that it is 'better' because the constraint definition stays in
>the database and it is easy to re-enable it.
>
>On a related note, has anyone noticed that the SQL Language reference manual no
>longer lists 'UNIQUE' as an option on the 'CREATE INDEX' command? Is this
>because ORACLE is at some point going to require you to enforce uniqueness
>through a constraint? The 'CREATE UNIQUE INDEX' command still works fine under
>7.1.3.
>
>Bob
>--
>Bob Swisshelm | swisshelm_at_Lilly.com | 317 276 5472
>Eli Lilly and Company | Lilly Corporate Center | Indianapolis, IN 46285
Received on Wed Dec 14 1994 - 17:44:27 CET

Original text of this message