Skip to Content
avatar image
Former Member

powerdesigner automatic relationship defining


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.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 10 at 01:22 PM

    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.



    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10 at 11:34 AM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 14 at 12:09 PM

    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 ...

    Add comment
    10|10000 characters needed 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.