Skip to Main Content

SQL Developer Data Modeler

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!

generated mutiple FK per relation

a9e95d78-14e3-421f-9bf4-425d6c966d14Apr 8 2015 — edited Apr 9 2015

Lets start with the design. The focus is on 2 one on one relations where a person chooses a trip or a phone (as a bribe).

pastedImage_2.png

This is translated to the following scheme

pastedImage_3.png

Data modeller did generate 2 FK for each relation. I expected only 1 FK per relation, in the Person table so a trigger can check on the XOR of the arc constraint. This scheme is not what i imagined as a solution. What if we have these 2 records?
Person.p_id = 1 AND Person.t_id =2

trip.t_id = 2 AND trip.p_id =3

There is nothing to prevent this from happening, consistency down the drain... And even then, what would this accomplish that one set of relations cant do?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2015
Added on Apr 8 2015
3 comments
736 views