A Classification Type is used to devide entities or tables in groups. Using them makes it easier to see different kinds of elements in a diagram or to use Transformation Scripts to only touch certain kinds of elements, for example.
There are some pre-defined Classfication Types in Data Modeler but you are able to define your own types if wanted. You can find the Classification Types in Design Properties (double-click the design name in Browser or right-click and select Properties).
You can add new Classification Types by pressing the green plus. Insert the name, maybe the Prefix and select the Format (background color, border color, font). You can also define this Classification Type to be a preferred type. If you have plenty of Classification Types you might want to define the ones you use as preferred and use only those while defining the Classification Type for an entity. By enabling the Preferred check-box beside the green plus and red cross you set Preferred as the default when defining a Classification Type for an entity or a table.
Let’s define a Classification Type for hubs and define it as preferred:
To define a Classification Type for an entity go to Entity Properties and select the Classification Types tab:
If you defined Preferred as default in the Design Properties, it will be enabled automatically and only preferred Classification Types will be shown.
You can also enable Preferred in this screen if you want to.
Now select the Classification Type wanted from the list.
Note, if you want you can also define additional Classification Types for an entity but the properties defined for the base Classification Type will be used in a diagram.
The entity will be shown in the diagram using the definitions specified for a base Classification Type. If you change the font or colors for the Classifiacation Type afterwards, they will be changed for the entity/table of that type automatically.
Note that the Classification Type will be a property for a table as well and will be engineered to the table as it was defined for the entity when you use the Engineer to Relational Model functionality to generate the tables.
If you defined a prefix for a Classification Type you can use it as a prefix for a tableof that type. First select the relational model from Browser, right-click and select Change Object Names Prefix:
Then select Add Classification prefix.
Now the prefix defined in the Classification Type definition has been added to the table names that are defined as of that Classification Type.
You can, for example, use the prefix when defining Transformation Scripts and limit the functionality to tables with that prefix.
P.S. You can also set Classification Types to several entitites at the same time by right-clicking the Logical Model in Browser and selecting Set Classification Types.
Kent Graziano said:
You can also apply classification types to tables in the Relational Model as well! I wrote about that some time ago and used Hub, Links, and Sats too for my example. https://kentgraziano.com/2014/01/19/better-data-modeling-color-code-your-data-model-diagrams-using-sqldevmodeler/
Yes, I do mention it in the beginning of the post but I like to encourage people to use ER diagram when designing the database and that’s why I want to highlight the fact that you can do it for entities.
Kent Graziano said:
Agree – always best to start with Logical Model.