A semantic approach to optimize linear datalog programs

In this work, we present a semantic query optimization approach to improve the efficiency of the evaluation of a subset of SQL:1999 recursive queries. Using datalog notation, we can state our main contribution as an algorithm that builds a program P′ equivalent to a given program P, when both are applied over a database d satisfying a set of functional dependencies. The input program P is a linear recursive datalog program. The new program P′ has less different variables and, sometimes, less atoms in rules, thus it is cheaper to evaluate. Using coral and ibm db2, P′ is empirically shown to be more efficient than the original program.

[1]  Alin Deutsch,et al.  Rewriting queries using views with access patterns under integrity constraints , 2005, Theor. Comput. Sci..

[2]  Jeffrey F. Naughton,et al.  Efficient evaluation of right-, left-, and multi-linear rules , 1989, SIGMOD '89.

[3]  Harry G. Mairson,et al.  Undecidable optimization problems for database logic programs , 1993, JACM.

[4]  José R. Paramá,et al.  Implication of Functional Dependencies for Recursive Queries , 2003, Ershov Memorial Conference.

[5]  Ke Wang,et al.  Preservation of Integrity Constraints in Definite DATALOG Programs , 1992, Inf. Process. Lett..

[6]  Moshe Y. Vardi Decidability and undecidability results for boundedness of linear recursive queries , 1988, PODS.

[7]  José R. Paramá,et al.  A Semantic Query Optimization Approach to Optimize Linear Datalog Programs , 2002, ADBIS.

[8]  Val Tannen,et al.  Object/relational query optimization with chase and backchase , 2000 .

[9]  Stavros S. Cosmadakis On the first-order expressibility of recursive queries , 1989, PODS '89.

[10]  Alfred V. Aho,et al.  The theory of joins in relational data bases , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[11]  Kenneth A. Ross,et al.  Tail recursion elimination in deductive databases , 1996, TODS.

[12]  Serge Abiteboul Boundedness is Undecidable for Datalog Programs with a Single Recursive Rule , 1989, Inf. Process. Lett..

[13]  Stavros S. Cosmadakis,et al.  Parallel evaluation of recursive rule queries , 1985, PODS '86.

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

[15]  Yannis E. Ioannidis A time bound on the materialization of some recursively defined views , 2005, Algorithmica.

[16]  Jeffrey F. Naughton,et al.  Data independent recursion in deductive databases , 1985, J. Comput. Syst. Sci..

[17]  Nadine Lerat Query Processing in Incomplete Logical Databases , 1986, ICDT.

[18]  Jack Minker,et al.  On recursive axioms in deductive databases , 1983, Inf. Syst..

[19]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[20]  Yehoshua Sagiv Optimizing Datalog Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[21]  W. W. Armstrong,et al.  Dependency Structures of Data Base Relationships , 1974, IFIP Congress.

[22]  David Maier,et al.  Testing implications of data dependencies , 1979, SIGMOD '79.

[23]  Alan R. Simon,et al.  Sql: 1999 Understanding Relational Language Components , 2002 .

[24]  Raghu Ramakrishnan,et al.  Magic Templates: A Spellbinding Approach To Logic Programs , 1991, J. Log. Program..

[25]  Yannis Papakonstantinou,et al.  Query rewriting for semistructured data , 1999, SIGMOD '99.

[26]  Jack Minker Foundations of deductive databases and logic programming , 1988 .

[27]  Divesh Srivastava,et al.  CORAL - A Database Programming Language , 1990, Workshop on Deductive Databases.

[28]  José R. Paramá,et al.  Chasing Programs in Datalog , 1998, DDLP.

[29]  Robert E. Tarjan,et al.  Variations on the Common Subexpression Problem , 1980, J. ACM.

[30]  Jerzy Marcinkowski The 3 Frenchmen Method Proves Undecidability of the Uniform Boundedness for Single Recursive Rule Ternary DATALOG Programs , 1996, STACS.

[31]  Laks V. S. Lakshmanan,et al.  Structural query optimization—a uniform framework for semantic query optimization in deductive databases , 1991, PODS '91.

[32]  John Grant,et al.  Foundations of Semantic Query Optimization for Deductive Databases , 1988, Foundations of Deductive Databases and Logic Programming..

[33]  Catriel Beeri,et al.  A Proof Procedure for Data Dependencies , 1984, JACM.

[34]  José R. Paramá,et al.  The Chase of Datalog Programs , 1998, BNCOD.

[35]  David Maier,et al.  The Theory of Relational Databases , 1983 .

[36]  Jeffrey F. Naughton,et al.  A decidable class of bounded recursions , 1987, PODS '87.

[37]  Alin Deutsch,et al.  A chase too far? , 2000, SIGMOD '00.

[38]  Jeffrey D. Ullman,et al.  Principles Of Database And Knowledge-Base Systems , 1979 .

[39]  Alin Deutsch,et al.  Reformulation of XML Queries and Constraints , 2003, ICDT.