Tutorials: Creating and Working with Submodels
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.
- Choose File > Open.
- Select Orders.dm1 and then click Open.
- 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.
- Collapse the folders in the Data Model tab of the Data Model Explorer to look like the image below:
- 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.
- 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.
- With the entities selected, choose Model > Create Submodel.
- Below Create Submodel, enter Address Components as the name for the submodel.
- 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.