Re: Primary Keys vs. Unique Index

From: <jl34778_at_corp02.d51.lilly.com>
Date: 13 Dec 94 15:29:25 EST
Message-ID: <1994Dec13.152925.1_at_corp02.d51.lilly.com>


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 Tue Dec 13 1994 - 21:29:25 CET

Original text of this message