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 -> Column to track mu;ltiple foriegn keys

Column to track mu;ltiple foriegn keys

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Sat, 21 Jul 2001 21:25:22 GMT
Message-ID: <3b424337.953937640@news.alt.net>

I have a table that is a hash of three item ids. The first two ids cannot be null and are foreign keyed to specific tables. The third id is not always there. If it is, it must reference an id from one of a few tables.

Item_A



Id
Name

Item_B



Id
Name

Special_1



Id
Name

Special_2



Id
Name

Special_3



Id
Name

Hash_Table



Item_A_Id (NOT NULL FK)
Item_B_Id (NOT NULL FK)
Special _Id (NULL FK)

The third column is tricky. It can point to one of many tables.

I see two possibilities,

  1. Have a foreign key for each possible Special.
  2. Have one column for each special, and another column to specify which special is being referenced.

Any ideas?

Brian Received on Sat Jul 21 2001 - 16:25:22 CDT

Original text of this message

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