Abstract
In practice most recursive logic queries to a deductive database are linear. According to /JaAgNe 87/ every linearly recursive query can be expressed by one so-called transitive closure query and several non-recursive queries.
A transitive closure query TC refers to two binary relations R and Q. It corresponds to a so-called database digraph DG=(VR,R) and a set Vgoal of special nodes in DG. Given an arbitrary c ∈ VR. The major step in the bottom-up evaluation of TC is to efficiently compute the set of all (c,Y) ∈ R⋆, Y ∈ Vgoal.
The first technique clusters the database digraph, which yields a connection hypergraph CH, a clustergraph CG and a skeleton graph SG. CG is the homomorphic image of DG w.r.t. the clustering, SG is a small special subgraph of the transitive closure DG⋆=(VR,R⋆) of DG. Based on CG and CH the query TC is decomposed into auxiliary queries that refer only to the relevant parts of R. This reduces the amount of intermediate tuples generated during query evaluation. Augmenting the database by the edges of the skeleton graph speeds up the evaluation of the auxiliary queries for arbitrary constants ‘c’.
The second technique refines the decomposition approach by a further clustering technique using some special knowledge about the structure of R. Every cluster contains one prototypical element, such that it suffices to solve auxiliary queries for the prototypes, since the results for other elements can then be derived easily from the prototypical results.
The combination of both clustering techniques is implemented in a Prolog-based advanced deductive database system, that solves traversal recursion problems on very large relations R, e.g. computes connecting paths in DG.
Preview
Unable to display preview. Download preview PDF.
References
A. Aho, J. Ullman: ‘Universality of Data Retrieval Languages', Proc. POPL 1979.
R. Agrawal, H. Jagadish: ‘Direct Algorithms for Computing the Transitive Closure of Database Relations', Proc. VLDB 1987.
F. Bancilhon, D. Maier, Y. Sagiv, J. Ullman: ‘Magic Sets and Other Strage Ways to Implement Logic Programs', Proc. PODS 1986.
F. Bancilhon, R. Ramakrishnan: ‘An Amateur's Introduction to Recursive Query Processing Strategies', Proc. ACM SIGMOD 1986.
R. Bayer, U. Güntzer, W. Kiessling, W. StrauB, J. Obermaier: ‘Deduktions-und Datenbankunterstützung für Expertensysteme', GI-Fachtagung, ‘Datenbanksysteme für Büro, Technik und Wissenschaft', Informatik-Fachberichte 136, 1987.
H. Gallaire, J. Minker: ‘Logic and Databases', Plenum Press, New York, 1978.
H. Gallaire, J. Minker, J. Nicolas: ‘An Overview and Introduction to Logic and Data Bases', in /GaMi 78/.
H. Gallaire, J. Minker, J. Nicolas: ‘Advances in Data Base Theory, Vol. 1', Plenum Press, New York, 1981.
H. Gallaire, J. Minker, J. Nicolas: ‘Advances in Data Base Theory, Vol. 2', Plenum Press, New York, 1984.
H. Gallaire, J. Minker, J. Nicolas: ‘Logic and Databases: A Deductive Approach', ACM Computing Surveys, vol. 16(2), 1984.
U. Güntzer, W. Kiessling, R. Bayer: ‘On the Evaluation of Recursion in (Deductive) Database Systems by Efficient Differential Fixpoint Iteration', Proc. Int. Conf. on Data Engineering 1987.
J. Han, G. Qadah, C. Chaou: ‘The Processing and Evaluation of Transitive Closure Queries', Proc. Intl. Conf. Extending Database Technology 1988, LNCS 303.
J. Han, L. Henschen: ‘Handling Redundancy in the Processing of Recursive Database Queries', Proc. ACM SIGMOD 1987.
L. Henschen, S. Naqvi: ‘On Compiling Queries in Recursive First-Order Data Bases', JACM, vol. 31(1), 1984.
J. Han, H. Lu: 'some Performance Results on Recursive Query Processing in Relational Database Systems', Proc. Int. Conf. on Data Engineering 1986.
Y. Ioanidis: ‘On the Computation of the Transitive Closure of Relational Operations', Proc. VLDB 1986.
H. Jagadish, R. Agrawal, L. Ness: ‘A Study of Transitive Closure as a Recursion Mechanism', Proc. ACM SIGMOD 1987.
M. Kifer, E. Lozinskii: ‘Filtering Data Flow in Deductive Databases', Proc. ICDT 1986.
M. Kifer, E. Lozinskii: ‘Implementing Logic Programs as a Database System', Proc. Int. Conf. on Data Engineering, 1987.
H. Lu: ‘New Strategies for Computing the Transitive Closure of a Database Relation', Proc. VLDB 1987.
A. Rosenthal, S. Heiler, U. Dayal, F. Manola: ‘Traversal Recursion: A Practical Approach to Supporting Recursive Applications', Proc. ACM SIGMOD 1986.
D. Sacca, C. Zaniolo: ‘On the Implementation of a Simple Class of Logic Queries for Databases', Proc. PODS 1986.
D. Sacca, C. Zaniolo: ‘The Generalized Counting Method for Recursive Logic Queries', Proc. ICDT 1986.
J. Ullman: ‘Implementation of Logical Query Languages for Databases', ACM TODS, vol. 10(3), 1985.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Seipel, D. (1989). A graph-based decomposition approach for recursive query processing. In: van Leeuwen, J. (eds) Graph-Theoretic Concepts in Computer Science. WG 1988. Lecture Notes in Computer Science, vol 344. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-50728-0_40
Download citation
DOI: https://doi.org/10.1007/3-540-50728-0_40
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-50728-4
Online ISBN: 978-3-540-46076-3
eBook Packages: Springer Book Archive