Skip to Content
0

powerdesigner automatic relationship defining

Jan 10 at 06:08 AM

68

avatar image
Former Member

Hi,

I'd like to know if there is an option to automatically define relationships between entities (CDM) or between tables (PDM) based on common column names (Primary/foreign keys). I have over 65 objects so its a painful task to do it manually.

Thanks,

Asif.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Ondrej Divis Jan 10 at 01:22 PM
0

Actually, for PDM, there is an option you can select. Go to Tools - Rebuild Objects - Rebuil References... It will automatically create references between PK column(s) in one table and columns with the same code and data type in another table. More details in PD help:

Data Modeling - Building Data Models - Physical Diagrams - References (PDM) - Rebuilding References.

HTH,

Ondrej

Show 1 Share
10 |10000 characters needed characters left characters exceeded

There you go, Ondrej, answering the REAL question! (unlike me, who answered a different one)

0
George McGeachie Jan 10 at 11:34 AM
0

There isn't an option you can select, but you can achieve what you using a simple script, which can be triggered/run in several ways. I suggest the best way to do it is to define a custom check that does the following:

  1. constructs the name of a relationship/reference according to the naming standard
  2. if the current object name doesn't match the constructed name, return an error
  3. the autofix script for the error will rename the object according to the standard

In the script, be careful to avoid duplicate names - will need to check if proposed name already exists, if it does, suffix it with a (number)

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 14 at 12:09 PM
0

Of course, the same column name in 2 tables dies not necessarily imply a foreign key - primary key relationship. Nor do different column names in 2 tables imply the absence of such ...

Show 1 Share
10 |10000 characters needed characters left characters exceeded

You're right. That's why (some?) data discovery tools look at the actual data when looking for relationships. I think Experian Pandora does, I don't know about any others.

0