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: foreing key on part of a primary key

Re: foreing key on part of a primary key

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Wed, 8 Sep 1999 18:15:34 +0200
Message-ID: <7r624f$ki3$1@oceanite.cybercable.fr>


As color code is neither a real primary key nor unique, you cannot use the declarative way for the foreign key.

The only way i see is to create a trigger "before delete" on your color table and manually verify the deleted color is not referenced in another table.

Stephane sinet a écrit dans le message <7r5qi3$1as$1_at_minus.oleane.net>...
>Hello,
>I have to develop a multilanguage software, so all tables containing a label
>have
>a primary key with code + code language.
>ex : my table COLOR -> code color, code language, label color
>However i don't want to have the code language in all other tables who
>reference the color.
>How can i do, to refer to the color and have the constraint, i.e to forbid
>the delete of a color if it is referenced by another table.
>Thanks.
>
>
Received on Wed Sep 08 1999 - 11:15:34 CDT

Original text of this message

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