requisite to minimize and to control them for lowering
their probability to increase.
Of course, the amount of tolerable risk depends
on the application and often also on its users (think,
e.g., of stock market transactions). The example elab-
orated in 4.2 is open to interpretation. By assign-
ing convenient meanings to predicates, it could be in-
terpreted as a risk model of, e.g., financial services
(think, e.g., of Basel II), or a nuclear power plant.
4.2 An Extended Example
Of course, a single example can always be criticized
to be statistically irrelevant. However, for each of the
mentioned alternatives, several typical features that
are independent of the particular example are illus-
trated. In particular, we are going to see that, for
safety-critical applications, the use of a method that
is inconsistency-tolerant is more dependable than to
use one which is not. Our example will show that
using a non-inconsistency-tolerant method for moni-
toring risks may have fatal consequences.
We are going to compare inconsistency-tolerant
integrity checking with the following alternative ap-
proaches to monitor risk: brute-force evaluation, non-
inconsistency-tolerant integrity checking, repairing,
and consistent query answering (Arenas et al., 1999).
In detail, we address the following points 1) - 6).
1) The cost of the brute-force method.
2) The cost of inconsistency-tolerant methods.
3) The dependability of methods.
4) The cost of repairing the old state.
5) The cost of repairing the new state.
6) The risk of consistency query answering.
Let us consider a database D whith the following
definitions of view predicates rl, rm, rh that model
risks of low, medium and, respectively, high degree.
rl(x) ← p(x, x)
rm(y) ← q(x,y), ∼p(y,x)
rm(y) ← p(x, y), q(y,z), ∼p(y,z), ∼q(z,x)
rh(z) ← p(0, y), q(y,z), z > th
In the clause defining rh, let th be a evaluable
threshold value that we assume to be always greater
or equal 0. Now, let the risks be denied as in the fol-
lowing integrity theory:
IC = {← rl(x), ← rm(x), ← rh(x)}.
Before populating D with facts about p and q, let
us verify that IC is satisfiable at all by any etension of
D. Indeed, it is, e.g., by each extension of p such that
no fact of the form p(0,y) is in p and any of the fol-
lowing alternatives holds: either p = q, or D contains
{q(2,1), p(1,2), p(2,1)} and arbitrarily many facts of
the form p(n,n+ m), for n > 1, m > 0.
Now, let the extensions of p and q be as follows.
p(0,0), p(0,1), p(0,2), p(0,3), .. ., p(0, 10000),
p(1,2), p(2, 4), p(3,6), p(4,8),. .., p(5000, 10000)
q(0,0), q(1,0), q(3,0), q(5,0), q(7,0),..., q(9999,0)
Clearly, there is a single violated low-risk case in
D, which is caused by p(0,0). Let us make sure that
there is no other violated risk case in D, but trying to
refute each denial about rl, rm and rh.
First of all, there obviously is no other low-risk
cause of form p(x,x) that would violate ← rl(x).
Next, let us try to find an instance of the body of
the first clause of rm that would be true in D. Since
the second column of q is always 0, q(x,0),∼p(0,x),
would have to be true. That, however, cannot be,
since p(0,x) /∈ D for each x such that q(x, 0) ∈ D.
For trying to find a satsified instance of the body of
the second clause of rm, let e stand for an even num-
ber greater or equal 0, o for an odd number greater or
equal 1, and n for any natural number greater or equal
0. Further note that each p-fact in D is either of the
form p(0,e) or p(0,o) or p(n,2n), for n > 1. So, since
the second column of p joins with the first column of
q only if their value is an even number, the only possi-
ble instances of that clause which could make its body
true are of one of the following three forms:
p(0, e), q(e,z), ∼p(e, z), ∼q(z,0)
or
p(0,o), q(o,0), ∼p(o,0), ∼q(0, 0)
or
p(n,2n), q(2n,0), ∼p(2n,0), ∼q(0,n)
Obviously, none of these instances can become
true, because q(e,z) does not hold for any z, q(0, 0)
is true in D, and q(2n,0) is false for each n > 0.
Last, the clause of rh: to make its body true would
require that 0 > th, but we have excluded that. Hence,
we have verified that ← rl(0) is the only violated risk
case of IC in D, and that p(0,0) is its only cause.
Now, consider U = insert q(0,9999), for illustrat-
ing 1) - 6) above.
1) The cost of brute-force checking for any up-
date is high. That is a commonplace, but let us see in
some more detail to what brute-force evaluation of IC
amounts, for later comparison.
Evaluation of ← rl(x) involves a scan of all of
p. Evaluation of ← rm(x) involves joins of p and q,
a join of local p with remote q, plus possibly many
lookups in p and q. Evaluation of ← rh(x) involves
a join of local p with remote q, plus the evaluation of
MODELING AND MONITORING THE QUALITY OF DATA BY INTEGRITY CONSTRAINTS AND INTEGRITY
CHECKING
211