9       Create Subtype and Supertype Relationship

This section provides information to create the Subtype and Supertype relationship between two entities.

A scenario where the Subtype and Supertype relationship can be created is when an entity’s (parent entity) columns must be inherited into another (child entity).

For information about selecting and using the Subtype and Supertype in the data model merge process, see the Data Model Merge Guidelines section.

To create a Subtype and Supertype relationship between two entities, follow these steps:

1.     Open the erwin Data Modeler application. Select the Physical layer. In the Model Explorer section, right-click the Subject Areas and click New to create a dummy Subject Area.

Figure 1: Open erwin Data Modeler and create a new Subject Area

This illustration shows the erwin Data Modeler application page. In the Physical layer, create a new Subject Area.

2.     The Subject Area Editor window opens. In the Available Objects section, select the entities that must be added into the newly created Subject Area, and click the right arrow icon to move the selected objects into the Included Objects section. Click Close.

Figure 2: Select entities for the new Subject Area

This illustration shows the Subject Area Editor. Select and move the entities into the Included Objects section for the new Subject Area. Then click Close.

3.     On the ER_Diagram canvas, the selected entities are displayed, and the newly created Subject Area with objects is listed in the Model Explorer section. Select the Logical layer.

Figure 3: Select the Logical layer

This illustration shows the ER_Diagram canvas with the entities selected in the previous step. The newly created Subject Area with objects is listed in the Model Explorer section. You must change the Physical layer to the Logical layer using the dropdown box.

4.     Select the parent entity on the ER_Diagram canvas. Click Sub-categorySub-category icon.

Figure 4: Select the Sub-category icon

This illustration shows that when you change the Physical layer to the Logical layer, the Sub-category icon appears. You must select the Sub-category icon as a first step in creating the Supertype and Subtype relationship between two entities.

5.     First, click the parent entity in the relationship. Then click the child entity. In the illustration, the parent entity Basic Instrument Requirements table is Supertype and the child entity Annuity Contracts table is Subtype.

Figure 5: Create the Supertype and Subtype relationship

This illustration shows the Supertype and Subtype relationship creation. After selecting the Sub-category icon, on the ER_Diagram canvas, click the parent entity and then click the child entity in the relationship.

6.     To see the Supertype and Subtype relationship details of the parent-child entities, right-click the Relationship icon Relationship icon connecting the two entities, and select Properties.

Figure 6: Select Properties

This illustration shows the Supertype and Subtype relationship properties. When you right-click the Relationship icon, the menu lists items related to that Relationship. Select the Properties option.

7.     The Properties window opens. You can verify the Supertype and Subtype relationship details of the parent-child entities.

Figure 7: The Properties window

This illustration shows the Relationship Properties window. When you select the Properties option, the Properties window opens. You can verify the Supertype and Subtype relationship details of the selected entities. The General tab displays the Supertype entity details first and then the details of its Subtype entity. Use the Expand button to view the details.

8.     Save the settings. The Supertype and Subtype relationship is created between two entities.