Toad World® Forums

Foreign Keys in TDM 6.1

I have done reverse engineering of a schema by connecting to oracle db. This was successful & I was able to see the tables.

Now I added 5 tables to my physical model, which I generated in step 1.

I need to add foreign key to this model, which reference another schema on the same db. How can I add that ?

Just to clarify, I have Synonyms of those objects in this schema which I have imported while importing objects in this schema

Hello,

if you want to create relationship (foreign key) between two Entities, both entities must be present in model. You can add entities from other schema to your model. For add entities you can use Object Explorer from Toad Data Modeler. It is good tool when you want to add only few tables.

After you will have Parent Entity, Child Entity and Relation in your model, you can set what you want to generate. It's more way how do it. I recommend use "Generate" checkbox that is on each form of object

If you uncheck parent or child entity check tab Referencial Integrity on Generator form.

ReferencialIntegrity.png

Daril