Databases Reference
In-Depth Information
not only of data but also of the procedures of the organization, the analyst
should be aware of those differences.
The process, then, begins by an unambiguous description of the con-
straint. Next, the analyst should ascertain whether the violation of the
constraint is always restricted. In the former case, the constraint should be
supported declaratively using the SQL-supported check construct wherever
possible. Otherwise, a procedural approach is followed that eventually will
be implemented as triggers. The obtaining of policies starts by identifying
the structural operations that can violate the constraint either directly or
indirectly. However, some of those operations might be prevented from hap-
pening due to other constraints (e.g., the updating of some attributes is
restricted) or interface validation. For those operations that can be per-
formed, the context and compensating action that restore the validity must
be stated.
As an example, consider the rooms capacity threshold constraint.
Table 3.1 shows some of the distinct structural operations that can violate
that constraint. Some updates are prevented from happening by other con-
straints. Only new enrollments and the assignment of a room to an already
available course need to be monitored. The table also shows the distinct com-
pensating actions that follow the violation of the policy, which depends
on the cause: If a new enrollment overflows the capacity of the current
Table 3.1
Recovering Business Policy From the Rooms Capacity Threshold Constraint
Structural Operation
Possible?
Reaction
Name
Update of capacity on
classroom
No
—
No
Insert on enrollment
Yes
Find a bigger classroom
Enrollment overflow policy
Update of theStudent on
enrollment
No
—
—
Update of theCourse on
enrollment
No
—
No
Insert on distribution
Yes
Reject the update
Room inadequacy policy
Update of theClassroom
on distribution
No
—
—
Update of theCourse on
distribution
No
—
—
Search WWH ::




Custom Search