This section details the instructions to merge two data models.
Topic:
· The Data Model Merge Guidelines
To merge the two data models:
1. Open the erwin model.
2. Navigate to the Actions menu and click the Complete Compare option.
3. The Complete Compare section opens, which consists of seven input forms.
4. To access any of the seven input forms, in the left panel of the Complete Compare section, click the required form title. The seven input forms are:
§ Overview
§ Left Model
§ Right Model
§ Left Object Selection
§ Right Object Selection
§ Type Selection
§ Advanced Options
5. Overview: This form provides a brief description of the Complete Compare function
6. Left Model: Using the Left Model input form, you can select a data model for the left side of the comparison in the Complete Compare section.
To select the required model for the left side of the comparison, click Load. The File Open dialog appears. Search for the required data model file, select it and click Open. The selected data model loads into the Complete Compare section. You can see the selected data model in the Open Models in a Memory list box.
Alternatively, you can locate the required data model file on your computer and double-click to open it. The selected data model opens by default in the erwin model. Alternatively, if available, you can select the required data model in the Open Models in a Memory list box.
If the default selection of the data model for the left side of the comparison is not correct, follow step 4 to select the required data model. Else, click Next to go to the Right Model input form.
NOTE:
When you launch the Complete Compare function with one data model, that data model loads into the Right Model form of the Complete Compare section. When you open the second data model for comparison, the existing data model in the Right Model form moves to the Left Model form and the second data model loads into the Right Model form.
Figure 11: Left Model input form
7. Right Model: Using the Right Model input form, you can select the data model for the right side of the comparison in the Complete Compare dialog. The Right Model input form is identical to the Left Model input form.
To select the required model for the right side of the comparison, click Load. The File Open dialog appears. Search for the required data model file, select it and click Open. The selected data model loads into the Complete Compare section. You can see the selected data model in the Open Models in a Memory list box. Click Next to go to the Type Selection input form.
NOTE:
When you launch the Complete Compare function with one data model, that data model loads into the Right Model form of the Complete Compare section. When you open the second data model for comparison, the existing data model in the Right Model form moves to the Left Model form and the second data model loads into the Right Model form.
Figure 12: Right Model input form
8. Type Selection: This form is critical in the entire Complete Compare process. Using this form, you can customize the layout for the merged output data model based on the existing layout of the input data models. This form restricts the comparison to specific object types and properties of the data models.
a. In the Type Selection input form, expand Model. In the list box, select the required options using a checkbox.
NOTE:
· If the Type Resolution dialog does not appear, go to the next form. Therefore, click Next.
· When you select the Type Selection form, it may prompt the display of the Type Resolution dialog to equalize the UDPs across the left and right models. This is a GDM-46 error.
b. You can select the following type of multiple options in the Type Selection form:
— Subject Areas
— UDP
— Physical Table and Physical Column
— Logical Entity and Logical Attribute
— Subtype and Supertype
c. Below are the prompted values for Subtype (child table) set and Subtype items (child table elements) selection. To select all values from the Subtype Symbol, select the Subtype Symbol checkbox. Or to select individual Subtype items, expand Subtype Symbol, and select checkboxes against required Subtype items.
Figure 13: Type Selection form
d. Then click Next to go to the Left Object Selection form.
9. Left Object Selection: Using the Left Object Selection input form, you can select which objects (table properties) can be included from the Left Model form in the comparison process.
As shown in the image below, to choose the required Object Sets in the Choose Objects Using Sets list box, select the checkboxes against the Object Set names. The selected Object Sets appear in the Selected Objects list box on the right side.
NOTE:
You can select an individual item in each Object set. For example, expand Subject Areas object set, then select the individual checkboxes against required Subject Area item.
Figure 14: Left Object Selection input form
To include tables in the comparison process, you must select table Properties in the Type Selection form. Then the tables will appear in the Left Object Selection input form.
Figure 15: Select table properties in the Type Selection form
10. Right Object Selection: Using the Right Object Selection input form, you can select which objects (table properties) can be included from the Right Model form in the comparison process.
To choose the required Object Sets from the Choose Objects Using Sets list box, select the checkboxes against the Object Set names (you can select Object Sets like Subject Areas, Tablespaces, Indexes, Triggers). The selected Object Sets appear in the Selected Objects list box on the right side. Click Next to go to the Advanced Options form.
NOTE:
· You can select an individual item in each Object set. For example, if you are performing Subject Areas-wise Complete Compare, expand Subject Areas object set, then select the individual checkboxes against required Subject Area item. In the image below, based on apps requirement, we have selected all the Subject Areas.
· If there are very less number of tables to merge with a very huge model, then you can create a Dummy Subject Area in a small model and move the tables into Dummy Subject Area. To Complete Compare under the Left Object Selection form or the Right Object Selection form, select the Dummy Subject Area and perform Complete Compare.
Figure 16: Right Object Selection in the erwin Data Modeler for OFSDF
Figure 17: Right Object Selection in the erwin data modeler for OIDF
11. Advanced Options: This section consists of the functional options. In the image below, the selected options are mandatory. As per your requirement, select further options.
Figure 18: Advanced Options section
12. To initiate the comparison process, click Next and then click Compare. The Resolve Differences window opens.
13. In the Resolve Differences window, there are three methods to merge data models:
§ In the
first method, you can merge two data models at the data model level. To
merge a data model (Left Model) with another data model (Right Model),
expand Model, then click the Right Arrow. Alternatively,
to merge the Right Model with Left Model, click the Left Arrow
.
Figure 19: Merge two data models at the data model level
§ In the
second method, you can merge two data models at the table level. To merge
two data models at the table level, expand Model, expand Tables, select
Not Equal To
from the menu bar. Then to merge the Right Model with the Left Model at
table level, click the required table and click the Left Arrow
, and repeat
the same for each table. Or, to merge the Left Model with the Right Model
at the table level, click the required table and click the Right Arrow
, and repeat the same for each
table.
Figure 20: Merge the models at the table level in OFSDF
Figure 21: Merge the models at the table level in OIDF
§ In the third method, you can merge two data models at the Subtype and Supertype table level. To merge two data models at Subtype and Supertype level:
During an ongoing Supertype Subtype model complete comparison process, you cannot move the Supertype table directly from the Left Model or the Right Model. You must find all the relationships between the Supertype table (parent table) and Subtype tables (child tables). Then you can move the Subtype table and after that, move the Supertype table.
How to find the Supertype or Subtype table relationship?
i. Open the model where you are unable to move the table from left to right or from right to left. For illustration, BSP and ALM tables in OFSDF data model and Claims table in the OIDF data model along with Supertype and Subtype are considered.
ii. In Subject Areas, create a Dummy Subject Area with any name. Right-click Dummy Subject Area name, click Properties. The Dummy Subject Area ‘[name]’ Editor window opens.
Figure 22: Create a Dummy Subject Area
iii. In the Members
tab, select the required Table Name and click Grouped Right Arrow. This action moves the selected
object and the objects mapped to it from the Available Objects list box
to the Included Objects list box. In this illustration, in the Included
Objects list box, BSP_LEAF_COLUMNS is the Supertype (parent table) in
OFSDF and DIM_CLAIM in OIDF and the remaining are Subtype (child tables).
Figure 23: Move the objects in OFSDF to merge the two data models at Subtype and Supertype level
Figure 24: Move the objects in OIDF to merge the two data models at Subtype and Supertype level
iv. The Spanning Neighborhood window opens. In the Ancestors and Descendants sections, in Level, select value 1 to search for a one-to-one parent-child table relationship. The list of the Subtype tables mapped to the Supertype table appears. In this example, the list of Subtype tables mapped to the Supertype tables BSP_LEAF_COLUMNS in OFSDF and DIM_CLAIM in OIDF appears.
v. To include the required Subtype tables (for this Dummy Subject Area) in the comparison process, select them and click Add. Close the Spanning Neighborhood window.
vi. In the Subject Area ‘[name]’ Editor window, in the Included Objects list box, you can see the Supertype table (in this illustration, BSP_LEAF_COLUMNS in OFSDF and DIM_CLAIM in OIDF) and its Subtype tables.
Figure 25: Subject Area Editor window shows the Supertype table and its Subtype tables in OFSDF
Figure 26: Subject Area Editor window shows the Supertype table and its Subtype tables in OIDF
vii. Close the Subject Area ‘[name]’ Editor window. In the data model window, click Save to save the changes made in the model.
viii. Repeat all the steps for the data model merge until the Left Object Selection form (that is, repeat steps from 1 to 8).
ix. In the Left Objection Selection form, in the Choose Objects Using Sets list box, select all the Subject Areas along with the newly created Dummy Subject Area. Into this Dummy Subject Area, you moved the Subtype and Supertype tables in previous steps. Click Next.
x. Repeat steps 10 and 11.
xi. To initiate the comparison process, click Next and then click Compare. The Resolve Differences window opens.
xii. In the Resolve
Differences window, to merge two data models at table level, expand Model,
expand Tables, select Not Equal To
from the menu bar. Select the Supertype table (BSP_LEAF_COLUMN for OFSDF
and DIM_CLAIM for OIDF in this illustration), and move it to left (to
merge Right Model with Left Model, click the Left Arrow
)
or right (to merge Left Model with Right Model, click the Right Arrow
) side of the comparison as required.
In the considered illustration, BSP_LEAF_COLUMN for OFSDF and DIM_CLAIM for OIDF are the parent tables (Supertype) from the source table and its respective child tables (Subtype) are named as FSI_ACCID_HEALTH_INS_CO_CD, FSI_ACCID_HEALTH_INS_CO_MLS, DIM_ACCOUNT_CLASSIFICATION and so forth in OFSDF, and DIM_CLAIM_BASIS, DIM_CLAIM_FEATURE_STATUS and DIM_CLAIM_HANDLING_TYPE in OIDF. First, the child table names (Subtype table names) are moved from the source model to the target model, and then the Supertype table names BSP_LEAF_COLUMN in OFSDF and DIM_CLAIM in OIDF are moved to the target model.
14. Click Finish to complete the data model merging, and then click Save to save the output-merged model with merged data model as a part of the output model name.