Implementation of logical query languages for databases
- 1 September 1985
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Database Systems
- Vol. 10 (3) , 289-321
- https://doi.org/10.1145/3979.3980
Abstract
We examine methods of implementing queries about relational databases in the case where these queries are expressed in first-order logic as a collection of Horn clauses. Because queries may be defined recursively, straightforward methods of query evaluation do not always work, and a variety of strategies have been proposed to handle subsets of recursive queries. We express such query evaluation techniques as “capture rules” on a graph representing clauses and predicates. One essential property of capture rules is that they can be applied independently, thus providing a clean interface for query-evaluation systems that use several different strategies in different situations. Another is that there be an efficient test for the applicability of a given rule. We define basic capture rules corresponding to application of operators from relational algebra, a top-down capture rule corresponding to “backward chaining,” that is, repeated resolution of goals, a bottom-up rule, corresponding to “forward chaining,” where we attempt to deduce all true facts in a given class, and a “sideways” rule that allows us to pass results from one goal to another.Keywords
This publication has 7 references indexed in Scilit:
- On compiling queries in recursive first-order databasesJournal of the ACM, 1984
- Horn clauses and the fixpoint query hierarchyPublished by Association for Computing Machinery (ACM) ,1982
- Universality of data retrieval languagesPublished by Association for Computing Machinery (ACM) ,1979
- On Closed World Data BasesPublished by Springer Nature ,1978
- The Semantics of Predicate Logic as a Programming LanguageJournal of the ACM, 1976
- A Proof Procedure Using Connection GraphsJournal of the ACM, 1975
- Depth-First Search and Linear Graph AlgorithmsSIAM Journal on Computing, 1972