Algebraic optimization of recursive queries

Over the past few years, much attention has been paid to deductive databases. They offer a logic-based interface, and allow formulation of complex recursive queries. However, they do not offer appropriate update facilities, and do not support existing applications. To overcome these problems an SQL-like interface is required besides a logic-based interface. In the PRISMA project we have developed a tightly-coupled distributed database, on a multiprocessor machine, with two user interfaces: SQL and PRISMAlog. Query optimization is localized in one component: the relational query optimizer. Therefore, we have defined an eXtended Relational Algebra that allows recursive query formulation and can also be used for expressing executable schedules, and we have developed algebraic optimization strategies for recursive queries. In this paper we describe an optimization strategy that rewrites regular (in the context of formal grammars) mutually recursive queries into standard Relational Algebra and transitive closure operations. We also describe how to push selections into the resulting transitive closure operations. The reason we focus on algebraic optimization is that, in our opinion, the new generation of advanced database systems will be built starting from existing state-of-the-art relational technology, instead of building a completely new class of systems.

[1]  Yannis E. Ioannidis,et al.  On the Computation of the Transitive Closure of Relational Operators , 1986, VLDB.

[2]  Andreas Reuter,et al.  Tandem Database Group - NonStop SQL: A Distributed, High-Performance, High-Availability Implementation of SQL , 1987, HPTS.

[3]  Stefano Ceri,et al.  Distributed Transitive Closure Computations: The Disconnection Set Approach , 1990, VLDB.

[4]  Georg Gottlob,et al.  Translation and Optimization of Logic Queries: The Algebraic Approach , 1986, VLDB.

[5]  Martin L. Kersten,et al.  PRISMA Database Machine: A Distributed, Main-Memory Approach , 1988, EDBT.

[6]  Martin L. Kersten,et al.  A Logic Query Language and itsAlgebraic Optimization for aMultiprocessor Database Machine 1 , 1988 .

[7]  M.A.W. Houtsma Data and Knowledge Base Management Systems: Data Model and Query Processing , 1989 .

[8]  Letizia Tanca,et al.  Optimization of Systems of Algebraic Equations for Evaluating Datalog Queries , 1987, VLDB.

[9]  守屋 悦朗,et al.  J.E.Hopcroft, J.D. Ullman 著, "Introduction to Automata Theory, Languages, and Computation", Addison-Wesley, A5変形版, X+418, \6,670, 1979 , 1980 .

[10]  Jeffrey F. Naughton,et al.  Minimizing function-free recursive inference rules , 1989, JACM.

[11]  Stefano Ceri,et al.  An Overview of Parallel Strategies for Transitive Closure on Algebraic Machines , 1990, PRISMA Workshop.

[12]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[13]  Van GelderAllen A message passing framework for logical query evaluation , 1986 .

[14]  Shamim A. Naqvi,et al.  A Logical Language for Data and Knowledge Bases , 1989 .

[15]  Allen Van Gelder,et al.  A message passing framework for logical query evaluation , 1986, SIGMOD '86.

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

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

[18]  Matthias Jarke,et al.  Logic Programming and Databases , 1984, Expert Database Workshop.

[19]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

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

[21]  Georg Gottlob,et al.  Interfacing Relational Databases and Prolog Efficiently , 1986, Expert Database Conf..

[22]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

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

[24]  Jeffrey D. Ullman,et al.  Design Overview of the NAIL! System , 1986, ICLP.

[25]  Peter van Emde Boas,et al.  Storing and Evaluating Horn-Clause Rules in a Relational Database , 1986, IBM J. Res. Dev..

[26]  Martin L. Kersten,et al.  A Distributed, Main-Memory Database Machine , 1987, IWDM.

[27]  Abraham Silberschatz,et al.  A framework for the parallel processing of Datalog queries , 1990, SIGMOD '90.

[28]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[29]  Ouri Wolfson,et al.  Sharing The Load Of Logic-program Evaluation , 1988, Proceedings [1988] International Symposium on Databases in Parallel and Distributed Systems.

[30]  Peter M. G. Apers,et al.  Processing Recursive Queries in Relational Algebra , 1986, DS-2.

[31]  Laurent Vieille From QSQ towards QoSaQ: Global Optimization of Recursive Queries , 1988, Expert Database Conf..

[32]  Carlo Zaniolo,et al.  Magic counting methods , 1987, SIGMOD '87.

[33]  Chin-Liang Chang On Evaluation of Queries Containing Derived Relations in a Relational Data Base , 1979, Advances in Data Base Theory.