# Duplicate attributes from multiple foreign keys

**URL:** <https://forums.toadworld.com/t/duplicate-attributes-from-multiple-foreign-keys/1469>\
**Category:** Toad Data Modeler\
**Created:** [January 29, 2008, 7:48am UTC](https://forums.toadworld.com/t/duplicate-attributes-from-multiple-foreign-keys/1469 "2008-01-29T07:48:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fichtennadel](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@Fichtennadel](https://forums.toadworld.com/u/Fichtennadel)\
**Post date:** [January 29, 2008, 7:48am UTC](https://forums.toadworld.com/t/duplicate-attributes-from-multiple-foreign-keys/1469/1 "2008-01-29T07:48:14Z")

</div>

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](https://global.discourse-cdn.com/quest/original/1X/f247e050dc2ef55bdb8cb65504e5b7703192d6fa.gif)

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [January 30, 2008, 2:57am UTC](https://forums.toadworld.com/t/duplicate-attributes-from-multiple-foreign-keys/1469/2 "2008-01-30T02:57:10Z")

</div>

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
