Model Subsets

Top  Previous  Next

Model Subsets provide a basic organizational framework for your Model.  They let you break your model into more manageable pieces of related tables and views - in whichever way you want.  Its similar to a music playlist.  And like a music playlist, sometimes you want to automatically add items based on some criteria.  ModelRight 4.0  adds this capability.   In previous versions, you could manually select the individual objects that you want in the subset.   In ModelRight 4.0, you can either manually specify the subset objects or you can specify some criteria that is used to add and remove objects automatically.  The criteria can be defined in terms of some property having some value - or no value, or an inherited value, etc...  You can have multiple criteria that are combined to give you the result set that you want.

A Model Subset defines a subset of Model objects.  A Model can own any number of Model Subsets and a Model Subset can own any number of Diagrams.   i.e. the Model Subset defines the Model objects (i.e. Tables and Views) that will be in the Diagram and the Diagram defines how those objects are displayed.  This allows you to organize and view a given set of Tables and Views in many different ways.  Relations are automatically included in the Diagram if both the parent and child Tables/Views are in the Model Subset.

New in ModelRight 4.0

Like a music playlist,  you may sometimes want to have items automatically added based on some criteria.  ModelRight 4.0  provides this capability for Model Subsets.   You can specify a filtering condition and ModelRight 4.0 will automatically add and remove objects based on that condition - saving you the trouble of having to manually add and remove them.  ModelRight 4.0 provides a Model Subset Wizard to help you create and edit Model Subsets:

 

Simply right click on the background of the Diagrams portion of the Model Explorer to get the context menu:

 

First step is to select the type of object that you want to include in your Diagrams.   Uncheck the "Only Display Tables option if you want to include other types of objects besides Tables and Views.

First step is to select the type of object that you want to include in your Diagrams.   Uncheck the "Only Display Tables option if you want to include other types of objects besides Tables and Views.

Then specify how you want to add/remove objects of that type.  Select Manual if you want to manually select them or Automatically if you want to specify a condition that determines their membership.

Then specify how you want to add/remove objects of that type.  Select Manual if you want to manually select them or Automatically if you want to specify a condition that determines their membership.

 

The Manual option.  Just check the ones you want in your Model Subset's Diagram(s).  The controls below the list let you control what is displayed in the selection list.

The Manual option.  Just check the ones you want in your Model Subset's Diagram(s).  The controls below the list let you control what is displayed in the selection list.

 

With the Automatic option, you can specify a Filter condition.  In this example, we specified that we only want to display Tables that are in the HumanResources schema.

With the Automatic option, you can specify a Filter condition.  In this example, we specified that we only want to display Tables that are in the HumanResources schema.

 

or you can select the special value "Create One for Each Value" to have ModelRight create a Model Subset for each Schema.

or you can select the special value "Create One for Each Value" to have ModelRight create a Model Subset for each Schema.

You can also edit a Model Subset like any other object - select it and then change its properties in the Property Browser.  When you select a Model Subset, the following page will be displayed in the Property Browser to let you edit the Model Subset:.

 

If the "Content is Defined By Filter" option is not selected, then the Filter can still be used in conjunction with the Only Filter Contents option  to display only instances that satisfy the filtering condition.

Auto Attach New Tables - allows you to indicate that you would like any newly created Tables/Views to be automatically added to this Model Subset.

Include Child Tables - if this option is selected when you add a table(s), then along with the selected table(s), ModelRight 4.0 will add any tables that references the selected table(s).  Since the added table(s) will be selected after the add, you can continue to hit the add button to add additional levels of related child tables.

Include Parent Tables - if this option is selected when you add a table(s), then along with the selected table(s), ModelRight 4.0 will add any tables that the selected table(s) references.  Since the added table(s) will be selected after the add, you can continue to hit the add button to add additional levels of related parent tables.

 

After Reverse Engineering from the database, ModelRight 4.0 gives you the option to create a Model Subset for any of your Schema or Storage objects.