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.
- From the Palette, click Foreign Key.
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
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.
- In the Business Element Name field, enter a name for the foreign key element.
- Set the minimum occurrence and maximum occurrence respectively.
- If needed, from the Reference entity list, select the target entity to which you want to link the source entity.
- If needed, select the Render in the main tab check box to make the foreign key element displayed in the main tab.
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.