RE: [Q] what difference between PK and unique index + not NULL??

  • From: "Marquez, Chris" <CMarquez@xxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 18 Jan 2005 17:52:28 -0500

I think the problem is; what is "logical" and what is "technical".

"Logically" I would say that; PK =3D Unique index +  Not NULL.
But "Technically" the are very different...as others on the list have
pointed out.

You can't have a FK point to a "Unique index +  Not NULL" with out a PK
constraint!  That s a technical difference.

It is true that if you have a Unique index on your PK column that Oracle
will just use that Unique index and NOT drop if even when you drop the
PK constraint.

Also like this comment too; "Oracle can from version 8 up use non-unique
indexes to implement PK constraints."

Tell your consultant he is "technical right,  until the customer asks
for a child table (FK) on the original table.
 ;o)

Chris Marquez
Oracle DBA
HEYMONitor(tm) - heymonitor.com
"Oracle Monitoring & Alerting Solution"


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Powell, Mark D
Sent: Tuesday, January 18, 2005 2:24 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: [Q] what difference between PK and unique index + not
NULL??


The definition of a PK constraint is that it is a UK constraint plus the
"not null" constraint.  Indexing is a technical implementation issue and
is not really part of the PK definition.  After all Oracle can from
verion 8 up use non-unique indexes to implement PK constraints.


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of dba1 mcc
Sent: Tuesday, January 18, 2005 1:59 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: [Q] what difference between PK and unique index + not NULL??


I have some argued with contractor about Primary key
and Unique index +  Not NULL.  Contractor said Primary
Key =3D  (field specify NOT NLL and create unique index
..).  I rember some documents say Primary Key and
(unique index, not null) still some different.

Does anyone have opinion?

Thanks.  =20


        =09
__________________________________=20
Do you Yahoo!?=20
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l

Other related posts: