Tutorials: Establishing Relationships Between Entities
Go Up to Introduction
- On the Insert ribbon, click Relationships > Non-Identifying, Mandatory Relationship.
- To establish a relationship between Customer and Order, click the parent entity, Customer and then click the child entity, Order.
- Note: 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.
- 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.
- 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.
- Set the Logical Rolename and Physical Name to Shipping Address.