Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Foreign "Key" confusion
Hi all.
(Oracle 9.2.0.1.0, Windows XP)
I was wondering how I could restrict the values of a column in a child table to a parent column when that parent column is NOT unique. I know a foreign key can only be used to reference a unique (set of) columns.
What could I do to enforce child <-> parent relationship for a non-unique parent column?
Example:
referencing, "child" table:
columns = (TEXT_ID | EVENT_ID | ...)
pk = EVENT_ID
contraint = "the text_id must be a text_id existing in the "texts"
table"
Thanks for any tips on how to do this or any pointers to resources where such problems are discussed!
best,
Martin
p.s.: Just for the record, no, this is not homework :) Received on Fri Sep 15 2006 - 02:08:23 CDT
![]() |
![]() |