Databases Reference
In-Depth Information
Example 4.9
Assume that the transaction T
{insert(Emp(Sara, Marketing))} is to be
applied to our example DB. This transaction would be rejected by an integ-
rity constraint checking policy because it would violate the constraint IC2.
Note that T induces an insertion of Works(Sara) and, because Sara is not
within labor age, IC2 is violated.
In contrast, an integrity constraint maintenance policy would realize
that the repair insert(Work_age(Sara)) falsifies the violation of IC2. There-
fore, it would provide as a result a final transaction T
=
ยข=
{insert(Emp (Sara,
Marketing)),
insert(Work_age(Sara))}
that
satisfies
all
the
integrity
constraints.
4.4.3.2
View Updating and Integrity Constraints Enforcement
In principle, view updating and integrity constraint enforcement might seem
to be completely different problems. However, there exists a close relation-
ship among them.
A Translation of a View Update Request May Violate Some Integrity Constraint
Clearly, translations of view updating correspond to transactions to be
applied to the DB. Therefore, view updating must be followed by an integ-
rity constraint enforcement process if we want to guarantee that the applica-
tion of the translations does not lead to an inconsistent DB, that is, a DB
where some integrity constraint is violated.
For instance, a translation that satisfies the view update request U
=
{insert(Works(Sara))} is T
{insert(Emp(Sara, Marketing))}. We saw in
Example 4.9 that this translation would violate IC2, and, therefore, some
integrity enforcement policy should be considered.
View updating and integrity constraint checking can be performed as
two separate steps: We can first obtain all the translations, then check
whether they violate some constraint, and reject those translations that
would lead the DB to an inconsistent state.
In contrast, view updating and integrity constraint maintenance cannot
be performed in two separate steps, as shown in [51], unless additional infor-
mation other than the translations is provided by the method of view updat-
ing. Intuitively, the reason is that a repair could invalidate a previously
satisfied view update. If we do not take that information into account during
integrity maintenance, we cannot guarantee that the obtained transactions
still satisfy the requested view updates.
=
Search WWH ::




Custom Search