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.
- Open the property sheet of a table and lick 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.
The naming convention for an alternate key is AK followed by the number of the key column code; for example AK1_CUSNAME.
- [optional] Enter a name in the Constraint Name column. If you do not specify a name, PowerDesigner creates one automatically.
Note:
If you do not see the Constraint Name column, you can display it with the Customize Columns and Filter tool.
- Click the Properties tool 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.