| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Using the same FK in a table more then once
>> Academically speaking.. is it acceptable to have this scenario? <<
Yes, but you will find that SQL Server and some oither products chock on it: Something like this?
CREATE TABLE Ownership
(item_id INTEGER NOT NULL
REFERENCES Inventory (item_id),
current_owner INTEGER NOT NULL
REFERENCES Owners (owner_id),
prior_owner INTEGER NOT NULL
REFERENCES Owners (owner_id),
PRIMARY KEY (item_id, current_owner),
CHECK (current_owner <> prior_owner));
Received on Sat Sep 23 2006 - 10:21:35 CDT
![]() |
![]() |