Frame Constraints
In MD2, when you choose to relate your data elements as you would in a relational data model, you must create a constraint on or between the desired variable(s). Match allows numerous possibilities for constraining individual variables or groups of variables. It is important to remember that the constraints define the relationship and those definitions are then applied to the instance values of the variables. (For more on instances see the section on Frame instances)
In principle, a constraint can be created on any frame variable or any set of frame variables in a single frame or between two frames.
When a constraint is created different options are presented to the user. Based on each selection you will be given different options to define and apply the constraint. In some cases, it will be necessary to complete a Constraint Table. A constraint table is similar to a knowledge table in design but different in function. (see section on Constraint Tables for information).
A frame constraint can be applied to a single variable or a group of variables within the same frame. This type of constraint will allow you to operate on the sets or combinations of sets of instances of the variable(s) in the constraint. For example, if a frame constraint is applied to a variable with 10 instances, then all 10 instances will be checked against the constraint definition unless conditions are created in the constraint table to further define the combination of instances to be checked.
Type | Frame Constraint | Inter-Variable Constraint | Inter-Frame Constraint |
---|---|---|---|
Operate on: | Combination of sets of instances in a frame. | Combinations of variable values of every instance (or of every instance of a selected group of instances) in a frame. | Combinations of sets of instances in two frames. Combinations of variable values of every instance (or of every instance of a selected group of instances) in two frames. |
Procedure: | Checks a set of instances whether the specified constraints are met. | Checks each instance (or for each instance of a selected group of instances) of a frame whether the combination of values in the instance are allowed. | Checks a set of instances whether the specified constraints are met. Checks each instance (or for each instance of a selected group of instances) of a frame whether the combination of values in the instance are allowed. |
Appearances: | Constraint between instances in 1 frame:
|
Constraint between variables in the same frame:
|
Constraint between instances in 2 frames:
|
Constraint Tables
Constraint tables have similar look and feel to knowledge tables, but are different in several important aspects:
- Constraint tables are NOT exhaustive.
- Constraint tables use a subset of Match keywords that are available for knowledge tables plus the new keywords added for constraint tables. See the section on keywords for more information
In order to specify a constraint table, you must select a CONDITIONAL constraint or choose to add a constraint table by selecting the check box for Type is conditional. Then, in the properties window of the relation, click on the button Open constraint table.