Academia.eduAcademia.edu

Note that sets of guarded TGDs (with single-atom heads) are theories in the guarded fragment of first-
order logic [4]. Note also that guardedness is a truly fundamental class ensuring decidability. As shown in
[23], adding a single unguarded Datalog rule to a guarded Datalog* program may destroy decidability.

 [23], adding a single unguarded Datalog rule to a guarded Datalog~ program may destroy decidability.

In the sequel, let 7 be a relational schema, D be a database for R, and & be a set of guarded TGDs
on #. We first give some preliminary definitions as follows. The chase graph for D and & is the directed
graph consisting of chase(D, ©) as the set of nodes and having an arrow from a to b iff b is obtained from
a and possibly other atoms by a one-step application of a TGD o € &. Here, we mark a as guard iff a is
the guard of o. The guarded chase forest for D and & contains (i) for every atom a € D, one node labeled
with a, and (ii) for every node labeled with a € chase(D,%) and for every atom b € chase(D, X) that is
obtained from a and possibly other atoms by a one-step application of a TGD o € » with a as guard, one
node labeled with b along with an arrow from the node labeled with a. The subtree of a node v labeled with
an atom a (also simply called subtree of a) in this forest, denoted subtree(a), is the restriction of the forest
to all descendants of v. The type of an atom a, denoted type(a), is the set of all atoms b in chase(D,™)
that have only constants and nulls from a as arguments. Note that the subtree of (a node labeled with) an
atom a in the guarded chase forest depends only on the set of all atoms in the type of a (and no others).

Figure 1 Note that sets of guarded TGDs (with single-atom heads) are theories in the guarded fragment of first- order logic [4]. Note also that guardedness is a truly fundamental class ensuring decidability. As shown in [23], adding a single unguarded Datalog rule to a guarded Datalog* program may destroy decidability. [23], adding a single unguarded Datalog rule to a guarded Datalog~ program may destroy decidability. In the sequel, let 7 be a relational schema, D be a database for R, and & be a set of guarded TGDs on #. We first give some preliminary definitions as follows. The chase graph for D and & is the directed graph consisting of chase(D, ©) as the set of nodes and having an arrow from a to b iff b is obtained from a and possibly other atoms by a one-step application of a TGD o € &. Here, we mark a as guard iff a is the guard of o. The guarded chase forest for D and & contains (i) for every atom a € D, one node labeled with a, and (ii) for every node labeled with a € chase(D,%) and for every atom b € chase(D, X) that is obtained from a and possibly other atoms by a one-step application of a TGD o € » with a as guard, one node labeled with b along with an arrow from the node labeled with a. The subtree of a node v labeled with an atom a (also simply called subtree of a) in this forest, denoted subtree(a), is the restriction of the forest to all descendants of v. The type of an atom a, denoted type(a), is the set of all atoms b in chase(D,™) that have only constants and nulls from a as arguments. Note that the subtree of (a node labeled with) an atom a in the guarded chase forest depends only on the set of all atoms in the type of a (and no others).