Abstract: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 bottom-UP (= 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… Show more
“…1 We argue that both approaches have severe drawbacks. The first approach (the split of the original relation in two distinct smaller relation) examplifies an often criticized (although necessary) practice in relational database design: For reasons of storage (size) and coherency of the data (when updates are performed), the natural description of an application usually needs to be modified.…”
Section: Xe7mentioning
confidence: 97%
“…Since the first relational database systems were not capable of handling recursive views, deduction rules are 1 This representation is taken from the time table booklet published by Lufthansa.…”
Section: Xe7mentioning
confidence: 99%
“…Termination (or exhaustivity) is im portant in databases, for database users as opposed to programmers cannot be made responsible of termination of the queries they pose to a database. Finally, the speci fication given above provides with a simple formalization of the Alexander or Magic Set rewriting methods [1,2,57,7,55,4,21,8]: these rewritings are obtainable from the rule-based specification given above by partial evaluation (or partial deduction) [42,35,36,37,41]. These points are discussed in more detail in [13].…”
Section: Query Answeringmentioning
confidence: 99%
“…Instead of implementing several rewriting methods for, say, recursive query processing (e.g. [1,57,2,7,4]), for simplifying integrity constraints (e.g. [43,25,15]), for query optimization (e.g.…”
Section: Deduction Rules For Specifying System Componentsmentioning
confidence: 99%
“…[17,18,1,2,4,7,55,57,60,61,67,13]), and how integrity constraints are checked when the database is updated (see e.g. [17,18,15,25,39,43,47,49,53,19]).…”
“…1 We argue that both approaches have severe drawbacks. The first approach (the split of the original relation in two distinct smaller relation) examplifies an often criticized (although necessary) practice in relational database design: For reasons of storage (size) and coherency of the data (when updates are performed), the natural description of an application usually needs to be modified.…”
Section: Xe7mentioning
confidence: 97%
“…Since the first relational database systems were not capable of handling recursive views, deduction rules are 1 This representation is taken from the time table booklet published by Lufthansa.…”
Section: Xe7mentioning
confidence: 99%
“…Termination (or exhaustivity) is im portant in databases, for database users as opposed to programmers cannot be made responsible of termination of the queries they pose to a database. Finally, the speci fication given above provides with a simple formalization of the Alexander or Magic Set rewriting methods [1,2,57,7,55,4,21,8]: these rewritings are obtainable from the rule-based specification given above by partial evaluation (or partial deduction) [42,35,36,37,41]. These points are discussed in more detail in [13].…”
Section: Query Answeringmentioning
confidence: 99%
“…Instead of implementing several rewriting methods for, say, recursive query processing (e.g. [1,57,2,7,4]), for simplifying integrity constraints (e.g. [43,25,15]), for query optimization (e.g.…”
Section: Deduction Rules For Specifying System Componentsmentioning
confidence: 99%
“…[17,18,1,2,4,7,55,57,60,61,67,13]), and how integrity constraints are checked when the database is updated (see e.g. [17,18,15,25,39,43,47,49,53,19]).…”
In this article, we present an optimal bottom-up evaluation method for handling both linear and nonlinear recursion. Based on the well-known magic-set method. we develop a technique: labeling to record the cyclic paths during the execution of the first phase of the magic-set method and suspending the computation for the cyclic data in the second phase to avoid the redundant evaluation.Then we postpone this computation to an iteration process (the third phase) which evaluates the remaining answers only along each cyclic path. In this way. we can guarantee the completeness.In addition. for a large class of programs we further optimize our method by elaborating the iteration process and generating most answers for each cyclic path directly from the intermediate results instead of evaluating them by performing algebraic operations (after some of the answers for the first cyclic path are produced). Because the cost of generating an answer is much less than that of evaluating an answer, this optimization is significant.
In this article, we present an optimal bottom-up evaluation method for handling both linear and nonlinear recursion. Based on the well-known magic-set method. we develop a technique: labeling to record the cyclic paths during the execution of the first phase of the magic-set method and suspending the computation for the cyclic data in the second phase to avoid the redundant evaluation.Then we postpone this computation to an iteration process (the third phase) which evaluates the remaining answers only along each cyclic path. In this way. we can guarantee the completeness.In addition. for a large class of programs we further optimize our method by elaborating the iteration process and generating most answers for each cyclic path directly from the intermediate results instead of evaluating them by performing algebraic operations (after some of the answers for the first cyclic path are produced). Because the cost of generating an answer is much less than that of evaluating an answer, this optimization is significant.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.