Database Reference
In-Depth Information
3. no constant occurring in the conjunction of atoms
φ
on the left-hand side of ac is
associated with a measure attribute.
(
)
of Definition 2.2 implies that measure variables cannot
occur in the argument y i of an aggregation function
Specifically, condition
2
χ
i appearing in ac . Intuitively,
this means that no condition is imposed on measure variables, which can be viewed
as “placeholders”. Definition 2.2 implies that, for a given database instance D and
a steady aggregate constraint ac on the scheme of D , the tuples in D which are
“involved” in ac (i.e. the tuples where both
of the aggregation functions
in ac evaluate to true) can be detected without looking at measure attribute values.
As will be clearer in the following, this property allows us to translate ac into a set
of linear inequalities, and then express the computation of a card -minimal repair
w.r.t. ac and the database scheme as an instance of MILP problem. Basically, the
reason why such a translation works is that the above-discussed properties of steady
aggregate constraints ensure that repairing the inconsistencies will not create new
inconsistencies.
φ
and
α
Example 2.7. Consider the constraint
κ 1 of “Balance Sheet” example (defined in
Example 2.2). It is easy to see that this constraint is steady. In fact:
-
the formula
χ 1 on the right-hand side of the con-
straint contains no occurrence of measure attributes;
α
of the aggregation function
-
χ 1 and it does not
appear in any other conjunct on the left-hand side of the constraint;
- no constant is associated with a measure attribute on the left-hand side of the
constraint.
the unique measure variable v does not occur as argument of
κ
κ
Similarly, it is straightforward to see that constraints
2 and
3 of “Balance
Sheet” example are steady too.
Observe that also the constraints introduced in Example 2.4, as well as those
of Example 2.5, are steady. In the following example, instances of aggregate con-
straints which are not steady are discussed.
Example 2.8. Consider the database scheme introduced in Example 2.5, containing
the relation scheme R 2 (
, and the following constraint:
There is at most one “expensive” project (a project is considered expensive if its
costs are not less than 20 K ). This constraint can be expressed by the following ag-
gregate constraint:
Project , Department , Costs
)
χ ()
1, where
χ =
R 2 ,
1
, (
Costs
20 K
)
. As attribute Costs
is a measure attribute of R 2 , and it occurs in the formula
α
of the aggregation func-
tion
χ
, the above-introduced aggregate constraint is not steady (condition
(
1
)
of
Definition 2.2 is not satisfied).
Analogously, the aggregate constraint introduced in Example 2.6 is not steady.
Search WWH ::




Custom Search