Skip to main content Skip to complementary content

Adding a foreign key to link entities

Availability-noteDeprecated

About this task

You can add foreign keys to an entity so that the entity can be linked with one or more other entities.

Note that the foreign keys are only applicable to entities of anonymous complex type.

In this example, the DStar data model has two entities: Agency and Agent. An agency can have many agents, and an agent can be linked with an agency through a foreign key.

Procedure

  1. From the Palette, click Foreign Key.
  2. In the Data Model Entities area, click the source entity to which you want to add the foreign key element, and hold the mouse until the link reaches the target entity to which you want to link the source entity.
    If the target entity is too far away from the source entity to be reached by the link, you can click the source entity first and then release the mouse in the blank area. In this case, the target entity needs to be selected from the Reference entity list.
    A dialog box pops up.
  3. In the Business Element Name field, enter a name for the foreign key element.
  4. Set the minimum occurrence and maximum occurrence respectively.
  5. If needed, from the Reference entity list, select the target entity to which you want to link the source entity.
  6. If needed, select the Render in the main tab check box to make the foreign key element displayed in the main tab.
  7. Click OK to close the dialog box.
    The entity Agent is linked with the entity Agency by the foreign key element AgencyFK. For more information, see Browsing the graphical view of a data model.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!