
Chapter 3 Building Physical Diagrams
Alternate keys
An alternate key is a key attached to one or more columns whose values uniquely identify every row in the table, but which is not a primary key. An alternate key can also be a foreign key. Each alternate key can generate a unique index or a unique constraint in a target database.
Create key tool
You can also select one or several columns and use the Create Key tool in the Columns tab of the table property sheet.
To designate an alternate key:
- Double-click a table in the diagram to open its property sheet.
- Click the Keys tab, which lists all the keys defined for the table.
- Click the Add a Row tool, and type a name for the newly created key.
Alternate key naming convention
The naming convention for an alternate key is AK followed by the number of the key column code; for example AK1_CUSNAME.
- [optional] Type a constraint name in the Constraint Name column.If you do not specify a constraint name, PowerDesigner creates a default constraint name automatically.
Displaying additional property columns
If you do not see the Constraint Name column, display it with the Customize Columns and Filter tool. For more information, see the "Defining a filter on a list" section in the General Features Guide.
- Click the property tool and confirm the object creation in order to open the property sheet for the new key.
- Click the columns tab, which lists all the columns to which the key is attached. At key creation, the list is empty.
- Click the Add Columns tool to open a selection box listing all the columns in the table (except those attached to the primary key).
- Select one or more columns and click OK in each of the dialog boxes.
Copyright (C) 2007. Sybase Inc. All rights reserved.
|
|