Efficient Bottom-UP Computation of Queries on Stratified Databases

Abstract Magic-set transformations on (function-free) deductive databases that contain only positive body literals permit the efficient bottom-up evaluation of answers to a wide class of queries. We investigate the applicability of magic sets to stratified and allowed databases containing negative body literals. We introduce a new, less restrictive definition of allowedness. We then present an algorithm that performs a magic-set-based transformation on an initially stratified and allowed database. The answers to a query on the transformed database are evaluated using a structured bottom-up computation which retains the efficiency of the magic-set approach. The set of answers is then proved sound and complete with respect to the perfect model.

[1]  Catriel Beeri,et al.  On the power of magic , 1987, J. Log. Program..

[2]  Tadashi Kanamori,et al.  Preservation of Stronger Equivalence in Unfold/Fold Logic Program Transformation , 1990, Theor. Comput. Sci..

[3]  Frank Harary,et al.  Graph Theory , 2016 .

[4]  Jeffrey D. Ullman,et al.  Implementation of logical query languages for databases , 1985, TODS.

[5]  Yehoshua Sagiv,et al.  Optimizing datalog programs , 1987, Foundations of Deductive Databases and Logic Programming..

[6]  Keith L. Clark,et al.  Negation as Failure , 1987, Logic and Data Bases.

[7]  Lawrence J. Henschen,et al.  On compiling queries in recursive first-order databases , 1984, JACM.

[8]  Kenneth McAloon,et al.  Stratification and Knowledge Base Management , 1987, J. Symb. Comput..

[9]  Jean-Marc Pugin,et al.  Efficient Query Answering on Stratified Databases , 1988, FGCS.

[10]  David B. Kemp,et al.  Completeness of a Top-Down Query Evaluation Procedure for Stratified Databases , 1988, ICLP/SLP.

[11]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[12]  Carlo Zaniolo,et al.  On the implementation of a simple class of logic queries for databases , 1985, PODS.

[13]  Catriel Beeri,et al.  Sets and negation in a logic data base language (LDL1) , 1987, PODS.

[14]  Adrian Walker,et al.  Towards a Theory of Declarative Knowledge , 1988, Foundations of Deductive Databases and Logic Programming..

[15]  Carlo Zaniolo,et al.  Implementation of Recursive Queries for a Data Language Based on Pure Horn Logic , 1987, ICLP.

[16]  Raghu Ramakrishnan,et al.  Performance Evaluation of Data Intensive Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[17]  Leon Sterling,et al.  The Art of Prolog , 1987, IEEE Expert.

[18]  Laurent Vieille,et al.  Recursive Axioms in Deductive Databases: The Query/Subquery Approach , 1986, Expert Database Conf..

[19]  John C. Shepherdson,et al.  Negation as Failure II , 1985, J. Log. Program..

[20]  K. Chan,et al.  Equivalent logic programs and symmetric homogeneous forms of logic programs with equality , 1987 .

[21]  Allen Van Gelder,et al.  Negation as Failure using Tight Derivations for General Logic Programs , 1988, J. Log. Program..

[22]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[23]  Jack Minker,et al.  Logic and Databases: A Deductive Approach , 1984, CSUR.

[24]  Kotagiri Ramamohanarao,et al.  A Generalization of the Differential Approach to Recursive Query Evaluation , 1987, J. Log. Program..

[25]  Kotagiri Ramamohanarao,et al.  A Query Independent Method for Magic Set Computation on Stratified Databases , 1988, FGCS.

[26]  J. Naughton,et al.  Counting methods for cyclic relations , 1988, PODS.

[27]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[28]  Liz Sonenberg,et al.  On Domain Independent Databases , 1988, Foundations of Deductive Databases and Logic Programming..

[29]  David Harel,et al.  Horn Clauses Queries and Generalizations , 1985, J. Log. Program..

[30]  John W. Lloyd,et al.  A Basis for Deductive Database Systems II , 1986, J. Log. Program..

[31]  Kenneth Kunen,et al.  Signed Data Dependencies in Logic Programs , 1989, J. Log. Program..

[32]  François Bancilhon,et al.  Naive Evaluation of Recursively Defined Relations , 1986, On Knowledge Base Management Systems.

[33]  R. Ramakrishnan On the implementation of data intensive logic programs , 1987 .