Abstract
This paper considers the efficient evaluation of recursive queries expressed using Horn clauses. We define sideways information passing formally and show how a query evaluation algorithm may be defined in terms of sideways information passing and control. We then consider a class of information-passing strategies that suffices to describe most query evaluation algorithms in the database literature, and show that these strategies may always be implemented by rewriting a given program and evaluating the rewritten program bottom-up. We describe in detail several algorithms for rewriting a program. These algorithms generalize the counting and magic-sets algorithms to work with arbitrary programs. Safety and optimality of the algorithms are also considered. © 1991.
Cite
CITATION STYLE
Beeri, C., & Ramakrishnan, R. (1991). On the power of magic. The Journal of Logic Programming, 10(3–4), 255–299. https://doi.org/10.1016/0743-1066(91)90038-Q
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.