# Automatically displaying graphical relationships (i.e., foreign keys).

**URL:** <https://forums.toadworld.com/t/automatically-displaying-graphical-relationships-i-e-foreign-keys/1979>\
**Category:** Toad Data Modeler\
**Created:** [May 11, 2009, 3:36pm UTC](https://forums.toadworld.com/t/automatically-displaying-graphical-relationships-i-e-foreign-keys/1979 "2009-05-11T15:36:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnAlexanderLopez](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@JohnAlexanderLopez](https://forums.toadworld.com/u/JohnAlexanderLopez)\
**Post date:** [May 11, 2009, 3:36pm UTC](https://forums.toadworld.com/t/automatically-displaying-graphical-relationships-i-e-foreign-keys/1979/1 "2009-05-11T15:36:55Z")

</div>

Hi,

I created a workspace (the default “all Items” workspace). I tried to create a new workspace and reuse two existing tables that have a relationship between them (a foreign key between them). If I drag and drop (or choose) the two tables, the workspace doesn’t show me the graphical representation of the existing foreign key. I noticed that I have to go and bring the foreign key constraint in order for the diagram to present it graphically. Is there a way to bring two tables and make TDM identify instantaneously that there is a relationship between those preexisting tables so that it will show graphically the two tables and the foreign key relationship?

Thanks in advance.

Alex

---

<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:** [May 12, 2009, 1:04am UTC](https://forums.toadworld.com/t/automatically-displaying-graphical-relationships-i-e-foreign-keys/1979/2 "2009-05-12T01:04:55Z")

</div>

Hi Alex,

There are several ways how to add shortctus of tables + relationship on another WS, e.g.:  
A:

1. Select the objects on the All Items WS (including the relationship - use SHIFT).
2. Right-click the selection and select Add Into Workspace.
3. Select the WS where you want to add them.  
Note: If you selected Add Into New Workspace, a new WS would be created automatically.

B:

1. Right-click the newly created WS and select Add Selected Objects to Workspace.
2. From the dialog, select the tables and relationships that you want to add. Tip: Select just the relationship and confirm. The tables that the relationship connects will be added to the WS automatically.

C:  
You can drag the selected tables from Model Explorer to the Workspace. To add the relationship to them, right-click the table on the WS and select Fill Parent and Child Objects (or Parent or Child).

I recommend you to watch the following flash movie on shortcuts of objects:  
[http://modeling.inside.quest.com/entry.jspa?externalID=1666&categoryID=158](http://modeling.inside.quest.com/entry.jspa?externalID=1666&categoryID=158)

If you have any questions, please do not hesitate to write me back. Thanks.

Regards,

Vladka
