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: URGENT: Primary key vs Unique Index

Re: URGENT: Primary key vs Unique Index

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/02/27
Message-ID: <3315607C.16F2@mf.sigov.mail.si>#1/1

Keystroke wrote:
> Only Primary Keys can become foriegn keys in another table. To

This is simply not true! Both Primary Keys AND Unique Keys can become Foreign Key in another table!

> prevent an ambiguity as to which row the foriegn key is pointing, you
> really shouldn't (and yoiu can't, in Oracle) create nullable foriegn
> keys.

This is also not true in Oracle (and also in relational concept)! It is perfectly legal and acceptable to have foreign key that is composed of nullable columns, it is even not unusual to have forein key composed of only nullable columns!

> Therefore, the easiest way to insure that you do not create
> nullable foriegn keys is to insure that 1) you only can create foriegn
> keys from primary keys and 2) you cannot create a primary key from
> nullable columns.

Regards, Jure

-- 
 ===============================================================
 ! Jurij Modic                            Republic of Slovenia !
 !  tel: +386 61 178 55 14                Ministry of Finance  !
 !  fax: +386 61  21 45 84                Zupanciceva 3        !
 !  e-mail: jurij.modic_at_mf.sigov.mail.si  Ljubljana 1000       !
 ===============================================================
Received on Thu Feb 27 1997 - 00:00:00 CST

Original text of this message

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