Examples

The following examples illustrate how using the auto-reuse columns and auto-migrate columns options affects the creation of references.

Matching Child Table Column Exists

The following table shows the results of migrating primary key columns to a child table that contains a matching column for one of the primary key columns. The original two tables are also shown below:



Auto-reuse

Auto-migrate

Result

Description of child table

Selected

Selected



Col_1 is reused and Col_2 is created

Not selected

Selected



T1_Col_1 is created and Col_2 is created

Selected

Not selected



Col_1 is reused and Col_2 is not created

Not selected

Not selected



No column is reused and no column is created

Matching Child Table Column Is Already a FK Column

The following table shows the results of migrating primary key columns to a child table that contains a matching child table column that is already a foreign key column for another table. The original two tables are also shown below:



Auto-reuse

Auto-migrate

Result

Description of child table

Selected

Selected



T1_Col_1 is created and Col_2 is created

Not selected

Selected



T1_Col_1 is created and Col_2 is created

Selected

Not selected



No columns are reused or created

Not selected

Not selected



No columns are reused or created

Notes:

  • By default, only the properties of the primary key column are migrated to the foreign key. If the primary key column is attached to a domain, the domain will not be migrated to the new foreign key column unless the Enforce non-divergence option model option is selected (see Enforcing non-divergence from a domain in a data model).

  • The following table shows the results of changing references when you have selected the auto-migrate columns option:

    Action

    Result

    Modify reference attach point

    Migrate primary key in parent table to foreign key in child table

    Delete unused foreign key columns

    Modify reference join

    Delete primary key

    Delete corresponding foreign key and reference join

Migrate primary key in parent table to foreign key in child table

Delete unused foreign key columns

Modify reference join

Action

Result

Modify reference attach point

Migrate primary key in parent table to foreign key in child table

Delete unused foreign key columns

Modify reference join

Delete primary key

Delete corresponding foreign key and reference join

For more information on other model options for references, see Setting PDM Model Options.