Tables in Constraints

Previous Next

See Also

Tables involved in constraint handling are classified:

Transition Table

The transition table of a constraint is the table specified as Transition Table.

A constraint can be made transitional either by using the OLD() function or by setting the Transition Table attribute manually.

If a Transition Table is specified, you can only use the OLD() function on columns of that table. If you use OLD() but don't specify a transition table, the Rules Engine does it for you at constraint checking time. By definition, only transitional constraints have transition tables.

Triggering Table

The triggering table of a constraint is the table on which the manipulation takes place that causes the constraint evaluation.

All constraints have triggering tables. A non-transitional constraint has as many potential triggering tables as there are different tables mentioned in its SQL statement. A transitional constraint only has one triggering table, namely the transition table, because transitional constraints are only evaluated for a manipulation of the transition table.

Updated Table

The updated table of a constraint is the table in which records are updated by the constraint.

Only corrective constraints have an updated table. The updated table is always the table mentioned in the INSERT INTO, UPDATE, or DELETE FROM clause of the statement.

For transitional constraints, the updated table need not be the transition table.