Tutorials: Creating and Working with Submodels

From ER/Studio Data Architect
Jump to: navigation, search

Go Up to Introduction

Now that you have a general understanding of how to build logical models from the ground up in ER/Studio Data Architect, it is important to understand how to work with an important navigation feature of ER/Studio Data Architect, called Submodels. Submodels and nested submodels are designed to break down large, complicated views of a data model in order to focus on a specific area. An important aspect of Submodels to understand is that any changes made in the submodel, other than layout, color, display settings, notation or similar items which can be unique to the submodel, will occur automatically in the Main Model view. In other words, change or add an attribute to an object in a Submodel and the change is automatically propagated to its Main Model counterpart.

Close the current sample model, and open a more mature model. Use this exercise to learn more about submodeling.

  1. Choose File > Open.
  2. Select Orders.dm1 and then click Open.
  3. To preserve this sample model for future use, choose File > Save As and then save the Orders.dm1 file with a new name.
    In this exercise, we will be modifying this model.
  4. Collapse the folders in the Data Model tab of the Data Model Explorer to look like the image below:
    Data Model Explorer.gif
    In the Orders.DM1 sample model, there are no physical models. This model includes several submodel folders that help to describe the logical model:
    • Main Model – This is the entire collection of all logical objects in the Orders.DM1 file. Note the absence of the magnifying glass on the folder icon which designates it as the main model.
    • Bill of Materials through Shopping Cart – These are submodels, which are smaller collections of entities derived from the Main Model that help to describe specific areas of the Main Model free from other entities.
    • Alternate Key through Primary Key – These are nested submodels, which can go ‘n’ levels deep and are literally submodels of submodels.
    Feel free to explore. Click the plus sign (+) to expand these folders.
    Let’s create a submodel with all the objects related to the Orders.DM1 Address components.
  5. To make a new submodel, navigate to Logical Main model and with the CTRL key depressed, click the objects in the Data Model Explorer, as seen in the image below.
    Notepad blue icon 2.pngNote: Any objects selected in the Data Model Explorer will also be selected on the Data Model Window as well (also seen here). You can also select entities by lassoing them on the Data Model Window.
  6. With the entities selected, choose Model > Create Submodel.
  7. Below Create Submodel, enter Address Components as the name for the submodel.
  8. Click OK.

ER/Studio Data Architect creates the Address Components submodel.


What do the results look like and how do I navigate to the submodel?

Once created, you will see the new submodel listed in the Data Model Explorer, denoted as a submodel by the magnifying glass over its folder, as in the case with Bill of Materials and the other submodels.


See Also