Tutorials: Establishing Relationships Between Entities

From ER/Studio Data Architect
Jump to: navigation, search

Go Up to Introduction

  1. On the Insert ribbon, click Relationships > Non-Identifying, Mandatory Relationship.
    Magic Wand Icon.pngTip: You can change the model notation by choosing Model > Model Options, and then selecting another notation option in the Notation area.
  2. To establish a relationship between Customer and Order, click the parent entity, Customer and then click the child entity, Order.
    Notepad blue icon 2.pngNote: ER/Studio Data Architect supports sound design practices by automatically propagating the primary key, from parent to child entities. If there are candidate alternate keys that should also be propagated to the child, in the Relationship Editor you can choose all available parent entity keys in the Parent Key list. Deleting a relationship will remove a non-native propagated attribute. However, if you want to keep the child columns of the relationship or foreign constraint, when you delete the relationship you can check the Make Foreign Keys Native option. In this case, if the relationship between Customer and Order is deleted, the CustomerID will be left in the Order entity.
  3. You can edit the relationship properties by right-clicking the relationship, and then selecting Edit. You can set a variety of information about the relationship in Properties, or you can forward and reverse phrases. To set phrases, click Phrases, and then set the forward and reverse relationship phrases.
    Notepad blue icon 2.pngNote: ER/Studio Data Architect lays out the phrases as sentences to confirm the context of the relationship.
  4. Create two relationships between Order and Address. Where you have multiple relationships between entities, the propagated foreign key is identical. When you create a second relationship between two entities, ER/Studio Data Architect opens a dialog to ask you to set role names which will generate unique foreign keys.
    Customer Order and Address.png
  5. Set the Logical Rolename and Physical Name to Shipping Address.
    Duplicate Relationship.png

See Also