Toad World® Forums

Duplicate attributes from multiple foreign keys


#1

Hello,

I am currently evaluating TDM 3.0.13.175 and hit the following problem:

I have 4 Tables: A (PK = AID), M (PK = AID,MID), F (PK = AID,FID) and FS. M and F reference A, FS references M and F, see attached screenshot to get a clearer picture.

The PK from A is inherited to M and F and forms a compound PK in M (PK = AID, MID) and F (PK = AID,FID). So far so good, but when I reference M and F from FS, the PK from A is inherited twice to FS. So the PK in FS is AID,MID,AID,FID but it should only by AID,MID,FID.

I tried to remove one of the AIDs in the Attribute or in the FS Key definitions, but no success. I know I can rename one of the AIDs in FS, but that is not the problem, I need to remove it.

Suprisingly, if I reverse engineer the tables from an Oracle DB, the model is created correctly.

Do you have any idea how to create such a model by hand?

Thanks in advance,
Georg

damo.gif


#2

Hello,

Please feel free to use the Foreign Keys Mapping feature.
Details can be found e.g. in: Help menu | select Manual or Help | Index tab and simply write ‘FK’. See the topic FK (Foreign Keys) Mapping.

If you have any questions, please write me back. Thanks.

Regards,

Vladka