Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Foreign Key To More Than One Column

Rajan SwNov 16 2012 — edited Nov 16 2012
Hi Guys,

I have a requirement like below

I have 3 tables (Prospect,customer,user) and I have a contact_dtls table .

In prospect table Prospect_id is the primary like this customer_id in customer table and user_id in the user table

in the contact_dtls table I have a column contact_id and other cols.The contact_id can be from prospect_id,customer_id and user_id in other words we can tell the prospect can be a contact or the customer can be a contact and the user also can be a contact also.Now the question is "is it possible to maintain primary key and foreign key relationship with this design that means the prospect_id,customer_id and user_id would be the foreign keys to the contact_dtls table

I am using oracle11g Version
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2012
Added on Nov 16 2012
3 comments
486 views