In this step, you will create multiple relationships between the Customer and Address entities in order to support Customer Delivery and Billing Addresses.
1. Define an Includes relationship between Customer and Address.
Customer will be the source entity and Address will be the target entity.
Specify Billing as the Descriptive Prefix. Note that the only allowable relationship between a Data entity and a Conceptual entity is the Includes relationship.
Once the relationship has been defined, the model diagram will appear something like this:
Note the following about the diagram:
2. Define another Includes relationship between Customer and Address.
Specify Delivery as the Descriptive Prefix.
The model diagram should now appear something like this:
Note that the Descriptive Prefix of a relationship is not mandatory – the relationship between the Order and Customer entities does not have one specified. In the case of the relationships between Customer and Address, however, it is advantageous to specify Descriptive Prefixes, so that the inherited elements can be differentiated.
3. Display the Customer Entity Elements window.
Note that the two sets of elements that have been inherited from the Address entity have the same field names. One of the rules for an entity build is that all field names must be unique within the entity.
4. For each of the 'Delivery' address elements, append a 'D' to the end of their field names.
For each of the 'Billing' address elements, append a 'B' to the end of their field names.
Note that all field names are now unique within the Customer entity.
5. Move the Delivery Address above the Billing Address. Notice that all of the included elements move together.
6. Close the Customer Entity Elements window.
The model diagram should now appear something like this:
7. Save the model.