Magic counting methods
- 1 December 1987
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGMOD Record
- Vol. 16 (3) , 49-59
- https://doi.org/10.1145/38714.38725
Abstract
The problem considered is that of implementing recursive queries, expressed in a logic-based language, by efficient fixpoint computations. In particular, the situation is studied where the initial bindings in the recursive predicate can be used to restrict the search space and ensure safety of execution. Two key techniques previously proposed to solve this problem are (i) the highly efficient counting method, and (ii) the magic set method which is safe in a wider range of situations than (i). In this paper, we present a family of methods, called the magic counting methods, that combines the advantages of (i) and (ii). This is made possible by the similarity of the strategies used by the counting method and the magic set method for propagating the bindings. This paper introduces these new methods, examines their computational complexity, and illustrates the trade-offs between the family members and their superiority with respect to the old methods.Keywords
This publication has 8 references indexed in Scilit:
- Worst-case complexity analysis of methods for logic query implementationPublished by Association for Computing Machinery (ACM) ,1987
- An amateur's introduction to recursive query processing strategiesPublished by Association for Computing Machinery (ACM) ,1986
- Implementation of logical query languages for databasesACM Transactions on Database Systems, 1985
- On the implementation of a simple class of logic queries for databasesPublished by Association for Computing Machinery (ACM) ,1985
- Magic sets and other strange ways to implement logic programs (extended abstract)Published by Association for Computing Machinery (ACM) ,1985
- On compiling queries in recursive first-order databasesJournal of the ACM, 1984
- The Semantics of Predicate Logic as a Programming LanguageJournal of the ACM, 1976
- Depth-First Search and Linear Graph AlgorithmsSIAM Journal on Computing, 1972