Skip to content

Creating Sub Models

CIRCLES ARROWS LIMITED edited this page Oct 18, 2018 · 1 revision

Creating Sub-Models

Sub-models is used to display selected entities and design your domain-specific database model.

Now, let's take a look on how to create a sub-model.

  1. Click the Model dropdown and select New.

New Sub-Model

  1. On Add Submodel dialog, set the sub-model Name as "MovieActors" and check the Is Draft to specify that this is a draft sub-model and not yet finished.

New Sub-Model

Note: The Chapter field is used for sorting models. The Is Laboratory checkbox is used to specify that the sub-model is only used for the playground or experiment and not an actual database model.

  1. You can specify the description/explanation of your sub-model and can use text formatting.

New Sub-Model

  1. Select entities that you want to include on the "MovieActors" sub-model. From the list-box on the left, select the "Movie" and "Person" entities and press > button.

New Sub-Model

  1. Click OK button to accept the sub-model details.

New Sub-Model

Oops! Looks like the model board is a mess.

New Sub-Model

  1. Right-click on the model board and select Redo Layout to re-arrange the entities.

New Sub-Model

New Sub-Model

Voila! 🎉 The entities are now arranged. Next, let's try to add existing entities in this model.

  1. Right-click on the model board and select Edit Submodel.

New Sub-Model

  1. Select the "Genre" entity from the list on the right side and press > button to include it in the MovieActors sub-model and press OK.

New Sub-Model

New Sub-Model

  1. Press the Redo Layout again to re-arrange the entities.

New Sub-Model

You have added the "Person" entity on the "Social Media" sub-model.

Now, as you've looked at the sub-model, you've realized that "Person" entity does not fit on the "Social Media" entity.

  1. To remove the "Person" entity, right-click on the model board and select Remove from Diagram.

New Sub-Model

Warning: Remove from Storage will remove the entity from storage, it means that it will be removed from the "Main Model" and all sub-models that the entity exists.

Remove from Diagram will remove the entity from the sub-model only.

New Sub-Model

Congratulations! You have successfully created the MovieActors sub-model.

Enjoy modelling using the Graph Modeller Tool! 😎🍕