Reputation: 4622
There was a certain requirement from my client. I got 2 tables from him lets assume X & Y. Both the tables have 60 fields. Now each table can be broken into master detail. So we have the following situation
Now XD = YD as they are identical.
Is there any way I can have DD as detail table with two masters so that some of the records in DD have their master X, other records have master Y? None of the records in DD can have both masters.
Is it possible in any way?
Upvotes: 0
Views: 106
Reputation: 55619
I'm not sure what database you're using or if I understand your requirements correctly, but, assuming I do, I'd suggest tables as follows:
Master(MasterID (Primary Key), {Common fields})
X({X specific fields}, MasterID (Foreign Key))
Y({Y specific fields}, MasterID (Foreign Key))
Upvotes: 1