Chapter 3 Building Physical Diagrams
Creating a reference
You can create a reference that links a primary key, or alternate key, to a foreign key, or user-specified columns in both parent and child tables.
When you create a reference, its properties depend on the current model options, and the existence, or non-existence, of a foreign key column in the child table with the same code as a migrating primary key column.
For more information on selecting model options for references see the section "Setting PDM Model Options".
For more information on column migration and reuse, see section Auto-migrating foreign keys.
To create a reference:
- Click the Reference tool in the tool palette.
- Click inside the child table and while holding down the mouse button, drag the cursor into the parent table containing the primary key, or alternate key to migrate. Release the mouse button.
The link appears between the two tables.
Dragging a reference to a different table
You can change the table at either end of a reference by clicking the reference and holding down ctrl as you drag one of its attach points to a different table.
- Click the Pointer tool.
or
Click the right mouse button.
You release the Reference tool.
- Double-click the new link in the diagram to display the reference property sheet.
- Type a reference name and a reference code.
- Select the Generate check box if you want to generate the reference.
You can open the property sheet of the child and parent tables by clicking the Child Table and Parent Table buttons located in the upper part of the reference property sheet.
- Click OK.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|