A file can be in one of three constraint states. In two of the
states, the constraint can be enabled or disabled.
- Non-constraint relationship state. No referential constraint exists
for a file in this state. If a constraint relationship once existed for the
file, all information about it has been removed.
- Defined state. A constraint relationship is defined between a dependent
and a parent file. It is not necessary to create the member in either file
to define a constraint relationship. In the defined state, the constraint
can be:
- Defined and enabled. A defined and enabled constraint relationship is
for definition purposes only. The rules for the constraint are not enforced.
A constraint in this state remains enabled when it goes to the established
state.
- Defined and disabled. A defined constraint relationship that
is disabled is for definition purposes only. The rules for the constraint
are not enforced. A constraint in this state remains disabled when it goes
to the established state.
- Established state. The dependent file has a constraint relationship
with the parent file. A constraint will be established only if the attributes
match between the foreign and parent key. Members must exist for both files.
In the established state, the constraint can be:
- Established and enabled. An established constraint relationship that is
enabled causes the database to enforce referential integrity.
- Established and disabled. An established constraint relationship that
is disabled directs the database to not enforce referential integrity.