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.

You can also select one or several columns and use the Create Key tool in the Columns tab of the table property sheet.

  1. Double-click a table in the diagram to open its property sheet.
  2. Click the Keys tab, which lists all the keys defined for the table.
  3. Click the Add a Row tool, and type a name for the newly created key.
    Note:

    The naming convention for an alternate key is AK followed by the number of the key column code; for example AK1_CUSNAME.

  4. [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.
    Note:

    If you do not see the Constraint Name column, display it with the Customize Columns and Filter tool. For more information, see "Customizing object list columns and filtering lists" section in the Objets chapter of the Core Features Guide.

  5. Click the property tool and confirm the object creation in order to open the property sheet for the new key.
  6. Click the columns tab, which lists all the columns to which the key is attached. At key creation, the list is empty.
  7. Click the Add Columns tool to open a selection box listing all the columns in the table (except those attached to the primary key).
  8. Select one or more columns and click OK in each of the dialog boxes.