There can be various reasons why all primary key attributes in your database structure should be named identically.
The most typical name is “ID”. But what if you start creating relationships?
In Toad Data Modeler all FK attributes are created automatically in child tables and because the names migrate as well, manual corrections might be necessary.
The following screenshot shows a sample of database structure where ID columns represent primary keys (in red) or foreign keys (in green).
All the foreign keys were added to child entities automatically and in many of the tables there are identically named attributes. Of course, this problem can be solved elegantly in Toad Data Modeler via Model Verification and the Quick Fixes feature that adds numbers/increments to the identically named objects.
In case you want to use parent entity name instead of numbers/increments do the following:
Download and install the Rename FK Columns package, restart Toad Data Modeler and then:
Select one or more relationships and choose Macros | Rename FK Column item to modify FK Column in child entity:
Or click Macros | Rename FK Column to modify all FK Column names in your model.
Result is displayed on the last screenshot.
Note: The macro adds Parent Entity Caption to FK Attribute Caption and Parent Entity Name to FK Attribute Name.
You can switch between Caption and Names using combo box in Toolbar.
Good Luck!
Start the discussion at forums.toadworld.com