Several methods for implementing database queries expressed as logical rules are given and they are compared for efficiency. One method, called “magic sets,” is a general algorithm for rewriting logical rules so that they may be implemented bottomUP (= forward chaining) in a way that cuts down on the irrelevant facts that are generated. The advantage of this scheme is that by working bottom-up, we can take advantage of efficient methods for doing massive joins. Two other methods are ad hoc ways of implementing “linear” rules, i.e., rules where at most one predicate in any body is recursive. These methods are 1 Work supported by NSF grant IST-83-51730, cosponsored by Tektronix Foundation, Intel, Mentor Graphics, DEC, Servio Logic Corp., IBM, Xerox and Beaverton Chamber of Commerce. 20n a leave of absence from Hebrew University. Work supported by a grant of AT&T Foundation and a grant of IBM Corp. SWork supported by NSF grant IST-84-12791 and a grant of IBM Corp. Permission to copy without lee all or part of this material is granted provided Out the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publi&on and its date appear. and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise..or to republish, rquim a fee and/or specific permission.
[1]
Jack Minker,et al.
Logic and Data Bases
,
1978,
Springer US.
[2]
Stuart C. Shapiro,et al.
Using Active Connection Graphs for Reasoning with Recursive Rules
,
1981,
IJCAI.
[3]
J. D. Uiiman,et al.
Principles of Database Systems
,
2004,
PODS 2004.
[4]
David H. D. Warren,et al.
Parsing as Deduction
,
1983,
ACL.
[5]
J. Ullman,et al.
Complexity of a top-down capture rule
,
1984
.
[6]
Adrian Walker,et al.
Some Practical Properties of Logic Programming Interpreters
,
1984,
FGCS.
[7]
Jeffrey D. Ullman,et al.
Implementation of logical query languages for databases
,
1985,
TODS.
[8]
François Bancilhon,et al.
Naive Evaluation of Recursively Defined Relations
,
1986,
On Knowledge Base Management Systems.
[9]
Allen Van Gelder,et al.
A message passing framework for logical query evaluation
,
1986,
SIGMOD '86.