< Previous | Next >

Creating the relationship

Roles have relationships, which are specified with the relationship editor. Relationships are useful in applications because they show how specific roles are related through similar data structures and data types. In this sample, you create a customer relationship composed of a generic customer, a banking customer, and a brokerage customer.

Creating a relationship involves defining a generic role, in this case a customer, and then some specific roles such as a bank customer and a brokerage customer. Key attributes are specified for each role. The key attribute used in this sample is the customer ID number.

The relationship you will create is called CustomerRelationship, because you are defining the role of the customers with respect to an application.

  1. In the Business Integration view, select eMergedLibrary.
  2. From the menu, select File > New > Relationship. The New Relationship window opens.
  3. From the Module list, click eMergedLibrary.
  4. In the Folder field, type com.emerged.portal.
  5. In the Name field, type CustomerRelationship.
    Image of the New Relationship window showing fields completed as described in the text
    The Namespace field is set to http://eMergedLibrary/com/emerged/portal.
  6. Click Next.
  7. Select A one-to-one relationship between business objects using the unique primary key.
  8. Clear the Used to transform data attributes according to a static mapping check box if it is selected.
  9. Click Finish. The editor opens for CustomerRelationship.
You will see an error marker on some of the artifacts. These are generated because a relationship requires a managed role. You will create that role next.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.
< Previous | Next >