Previous Topic: Enter a Foreign Key Comment to a RelationshipNext Topic: Define Referential Integrity Trigger Actions for Relationships


Assign a Rolename to a Migrated Index

When a primary key column migrates from a parent table to a child table, it becomes a foreign key column in the child table. Since a foreign key can have a different role than the role of the related primary key, you can assign a rolename to a foreign key column to describe its role in a particular table and to distinguish it from another column with the same name.

To assign a rolename to a migrated index

  1. Click Relationships on the Model menu.

    The Relationships editor opens.

  2. Select the relationship from the Relationship drop-down list to which you want to assign a rolename, then click the Rolename tab.

    The Rolename tab opens.

  3. Select from the following options and click OK:
    Migrated Index

    Lets you select the primary key column that migrates from the parent table to the child table in the current relationship. Use the drop-down list to select an index.

    Migrated Column/Rolename

    Displays the primary key column that is migrated from the parent table to the child table and the rolename associated with the column in the current relationship.

    Rolename

    Lets you enter a rolename for the column you selected from the Migrated Column/Rolename list. Enter the rolename in this field.

    Generate

    Specifies to use the preferences selected in the Relationships editor when DDL is generated during Forward Engineering. Select the check box to enable this option.

    The rolename is assigned to the migrated index and the Relationships editor closes.