Home > Data Modeler Dialog Boxes > Design Rules
Design rules are rules that can be applied to check and enforce the integrity and consistency of designs. Data Modeler comes with many predefined design rules, and you can add your own custom design rules. You can also define functions or methods to create custom transformations, and can group these transformations into libraries.
If you click Tools and then Design Rules, you can select one of the following:
This dialog box enables you to apply Design Rules and to group design rules into Rule Sets.
Design Rules
This tab enables you to check your current design (logical, relational, and process models) for any violations of predefined Data Modeler design rules. You can check all design rules or selected rules; each violation of the specified rules results in a warning or error message, as appropriate. You are encouraged to check your models against the design rules often, especially before any forward or reverse engineering operations and before generating DDL statements for a physical model.
Examples of design rule warnings and errors include a primary key with the wrong naming standards, a flow without information structures, and an external agent without data elements.
For any error, you can double-click its item to display the properties for the associated object, where you can correct the problem.
Expand All: Expands the display to show all design rules in all categories and subcategories. When one or more categories are expanded, you can select individual rules, ranges of rules, or a combination.
Collapse All: Collapses the display to show only the design rule major category names (General, Logical, Relational, Process Model, Physical).
Apply All: Applies all design rules to the current design; displays a warning or error message for each violation of a rule.
Apply Selected: Applies only the selected design rules to the current design; displays a warning or error message for each violation of a rule.
Clear: Clears any displayed warning and error messages.
This tab enables you to create and edit named rule sets. A rule set is a collection of rules that you want to be able to check as a set.
To create a rule set, click the Add Rule Set (plus sign) icon, specify a name for the rule set, double-click the rule set number (or click the Rule Set Properties pencil icon), and use the Rule Set Properties dialog box to move desired rules from the All Rules column into the Selected Rules column.
Apply All RS: Applies the design rules in all rule sets to the current design; displays a warning or error message for each violation of a rule.
Apply Selected RS: Applies only the design rules in the selected rule set or rule sets to the current design; displays a warning or error message for each violation of a rule.
Clear: Clears any displayed warning and error messages.
The Custom Rules dialog box enables you to create custom design rules using a language supported by the rules execution engine, such as the Mozilla Rhino JavaScript implementation.
Name: Name of the custom rule.
Object: Type of the objects to which to apply this rule. Examples include Table
, Column
, Entity
, and Attribute
.
Engine: Implementation used for interpreting and executing the rule.
Type: Severity if a violation of the rule is detected (Warning
or Error
).
Variable: Name of the variable associated with the rule.
Rule Script Library: Library containing the method associated with the rule.
Rule Script Method: Method associated with the rule. (To modify a method, use the Custom Libraries dialog box.)
You can save custom rules that you create, export custom rules that you have saved, and import design rules from an XML file.
The Custom Libraries dialog box enables you to view, create, and delete libraries for custom design rules, and within a selected library to add, delete, and edit the methods associated with custom design rules.
For information about design rules and custom design rules, see Design Rules.
The Custom Transformation Scripts dialog box enables you to view, create, delete, and edit custom transformation scripts for implementing custom design rules.
Name: Name of the custom transformation.
Object: Type of models (logical or relational) to which to apply this transformation.
Engine: Implementation used for interpreting and executing the transformation.
Variable: Name of the variable associated with the transformation.
Script Library: Library containing the method associated with the transformation.
Script Method: Method associated with the transformation.
You can save custom transformations that you create, export custom transformations to an XML file, and import transformations from an XML file.