Related primary/foreign keys [message #372198] |
Thu, 18 January 2001 12:08 |
Syed Afroz Alam
Messages: 2 Registered: January 2001
|
Junior Member |
|
|
A master table have composite primary key on two or three columns. Can we make a detail table which refer(foreign key) to one of the composite primary key columns of master table.
|
|
|
|
Re: Related primary/foreign keys [message #372202 is a reply to message #372198] |
Thu, 18 January 2001 13:01 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
As far as I know - NO. Sounds like what you need is a higher level table which your 2 or 3 field PK refers to. Then this other table you mention should reference the new higher level table.
An FK by definition means that each row in the child table is tied to a particular row in the parent table. The way to uniquely identify a row in the parent table is it's PK. I think you can also reference a unique constraint (alternate key - not a PK) but this won't help.
|
|
|