Within the research area of deductive databases three different database tasks have been deeply investigated: query evaluation, update propagation and view updating. Over the last thirty years various inference mechanisms have been proposed for realizing these main functionalities of a rule-based system. However, these inference mechanisms have been rarely used in commercial DB systems until now. One important reason for this is the lack of a uniform approach well-suited for implementation in an SQL-based system. In this paper, we present such a uniform approach in form of a new version of the soft consequence operator. Additionally, we present improved transformation-based approaches to query optimization and update propagation and view updating which are all using this operator as underlying evaluation mechanism. enhance existing methods to query optimization [3] as well as update propagation [6] and to develop a new approach to view updating. In order to handle alternative derivations that may occur in view updating methods, an extended version of the original soft consequence operator has to be developed. In this paper, this new version is presented, which is well-suited for efficiently determining the semantics of definite and indefinite databases but remains compatible with the set-oriented, bottom-up evaluation of SQL.
Basic conceptsA Datalog rule is a function-free clause of the form H 1 ← L 1 ∧ · · · ∧ L m with m ≥ 1 where H 1 is an atom denoting the rule's head, and L 1 , . . . , L m are literals, i.e. positive or negative atoms, representing its body. We assume all deductive rules to be safe, i.e., all variables occurring in the head or in any negated literal of a rule must be also present in a positive literal in its body. If A ≡ p(t 1 , . . . , t n ) with n ≥ 0 is a literal, we use vars(A) to denote the set of variables occurring in A and pred(A) to refer to the predicate symbol p of A. If A is the head of a given rule R, we use pred(R) to refer to the predicate symbol of A. For a set of rules R, pred(R) is defined asa finite set of facts (called base facts), I is a finite set of integrity constraints (i.e.,positive ground atoms) and R a finite set of rules such that pred(F ) ∩ pred(R) = Ø and pred(I) ⊆ pred(F ∪ R). Within a deductive database D, a predicate symbol p is called derived (view predicate), if p ∈ pred(R). The predicate p is called extensional (or base predicate), if p ∈ pred(F ). Let H D be the Herbrand base of D = F , R, I . The set of all derivable literals from D is defined as the well-founded model [21] for (F ∪ R): M D := I + ∪ ¬ · I − where I + , I − ⊆ H D are sets of ground atoms and ¬ · I − includes all negations of atoms in I − . The set I + represents the positive portion of the well-founded model while ¬ · I − comprises all negative conclusions. The semantics of a database D = F , R, I is defined as the well-founded model M D := I + ∪ ¬ · I − for F ∪ R if all integrity constraints are satisfied in M D , i.e., I ⊆ I + .Otherwise, the semantics of D is undefined. For the sake of...