Chapter 3 Building Physical Diagrams


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:

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 the section "Setting PDM Model Options".

 


Copyright (C) 2005. Sybase Inc. All rights reserved.