## Nonrecursive Incremental Evaluation of Datalog Queries (1995)

Venue: | Annals of Mathematics and Artificial Intelligence |

Citations: | 19 - 8 self |

### BibTeX

@ARTICLE{Dong95nonrecursiveincremental,

author = {Guozhu Dong and Jianwen Su and Rodney Topor},

title = {Nonrecursive Incremental Evaluation of Datalog Queries},

journal = {Annals of Mathematics and Artificial Intelligence},

year = {1995},

volume = {14}

}

### Years of Citing Articles

### OpenURL

### Abstract

We consider the problem of repeatedly evaluating the same (computationally expensive) query to a database that is being updated between successive query requests. In this situation, it should be possible to use the difference between successive database states and the answer to the query in one state to reduce the cost of evaluating the query in the next state. We use nonrecursive Datalog (which are unions of conjunctive queries) to compute the differences, and call this process "incremental query evaluation using conjunctive queries." After formalizing the notion of incremental query evaluation using conjunctive queries, we give an algorithm that constructs, for each regular chain query (including transitive closure as a special case), a nonrecursive Datalog program to compute the difference between the answer after an update and the answer before the update. We then extend this result to weakly regular queries, which are regular chain programs augmented with conjunctive queries havin...

### Citations

712 | The Semantics of Predicate Logic as a Programming Language - Emden, Kowalski - 1976 |

612 |
Towards a theory of declarative knowledge
- Apt, Blair, et al.
- 1987
(Show Context)
Citation Context ...atabase updates and (ii) the fact that the integrity constraints were satisfied prior to the updates [9, 28, 29]. Our task is closely related to the problem of efficiently updating the standard model =-=[2]-=- of a definite or more generally stratified database [4, 25]. Our approach is very useful in maintaining materialized views upon updates. It is also closely related to the problem of partially evaluat... |

458 |
Optimal Implementation of Conjunctive Queries in Relational Data 8ases
- Merlin
- 1977
(Show Context)
Citation Context ...es is inserted, since for example the transitive closure query (on the inserted set) cannot be computed by a nonrecursive program. Note that nonrecursive programs define unions of conjunctive queries =-=[11]-=-. Such queries allow very efficient computations, and have received extensive attention in the literature [3, 31]. As we shall argue later, queries permitting incremental evaluation using conjunctive ... |

301 |
Magic sets and other strange ways to implement logic programs
- Bancilhon, Maier, et al.
- 1986
(Show Context)
Citation Context ...it also raises the complexity of query evaluation. The problem of efficiently computing Datalog queries has attracted a great deal of attention in the database and logic programming communities e.g., =-=[6, 8, 12, 14, 17, 18, 24, 25, 27]-=-. In this paper, we consider the problem of repeatedly evaluating the same (computationally expensive) Datalog query to a database that is being updated between successive query requests. In this case... |

283 |
Maintaining views incrementally
- Gupta, Mumick, et al.
- 1993
(Show Context)
Citation Context ...it also raises the complexity of query evaluation. The problem of efficiently computing Datalog queries has attracted a great deal of attention in the database and logic programming communities e.g., =-=[6, 8, 12, 14, 17, 18, 24, 25, 27]-=-. In this paper, we consider the problem of repeatedly evaluating the same (computationally expensive) Datalog query to a database that is being updated between successive query requests. In this case... |

240 |
Partial evaluation in logic programming
- Lloyd, Shepherdson
- 1987
(Show Context)
Citation Context ...it also raises the complexity of query evaluation. The problem of efficiently computing Datalog queries has attracted a great deal of attention in the database and logic programming communities e.g., =-=[6, 8, 12, 14, 17, 18, 24, 25, 27]-=-. In this paper, we consider the problem of repeatedly evaluating the same (computationally expensive) Datalog query to a database that is being updated between successive query requests. In this case... |

203 |
Universality of data retrieval languages
- Aho, Ullman
- 1979
(Show Context)
Citation Context ...ormation, cartesian-closed increment, inductive definition. 1 Introduction Relational query languages have limited power since they cannot express recursive queries such as transitive closure queries =-=[5]-=-. Datalog provides a way of incorporating recursion into a query language. However, it also raises the complexity of query evaluation. The problem of efficiently computing Datalog queries has attracte... |

130 | Naturally embedded query languages
- Breazu-Tannen, Buneman, et al.
(Show Context)
Citation Context ... iterations depending on the original facts. In the incremental approach only one or two joins are necessary since the needed steps have previously been computed in anticipation. Structural induction =-=[7]-=-. The idea is to build a simple programming language whose main computational engine is structural recursion on sets. Our work can be viewed as special cases of structural induction where structural r... |

113 |
Logic for Improving Integrity Checking in Relational Data Bases
- Nicolas
- 1982
(Show Context)
Citation Context ...proach is analogous to the incremental checking of integrity constraint satisfaction by using (i) database updates and (ii) the fact that the integrity constraints were satisfied prior to the updates =-=[9, 28, 29]-=-. Our task is closely related to the problem of efficiently updating the standard model [2] of a definite or more generally stratified database [4, 25]. Our approach is very useful in maintaining mate... |

80 | A Uniform Approach to Constraint Satisfaction and Constraint Satisfiability in Deductive Databases
- Bry, Decker, et al.
- 1985
(Show Context)
Citation Context ...proach is analogous to the incremental checking of integrity constraint satisfaction by using (i) database updates and (ii) the fact that the integrity constraints were satisfied prior to the updates =-=[9, 28, 29]-=-. Our task is closely related to the problem of efficiently updating the standard model [2] of a definite or more generally stratified database [4, 25]. Our approach is very useful in maintaining mate... |

51 |
I n t e g r i t y constraint checking i n stratified databases
- Lloyd, Topor
- 1986
(Show Context)
Citation Context ...proach is analogous to the incremental checking of integrity constraint satisfaction by using (i) database updates and (ii) the fact that the integrity constraints were satisfied prior to the updates =-=[9, 28, 29]-=-. Our task is closely related to the problem of efficiently updating the standard model [2] of a definite or more generally stratified database [4, 25]. Our approach is very useful in maintaining mate... |

49 | Incremental evaluation of datalog queries, in - Dong, Topor - 1992 |

48 |
Naive evaluation of recursively defined relations
- Bancilhon
- 1985
(Show Context)
Citation Context |

39 | Leeuwen. Maintenance of transitive closure and transitive reduction of graphs
- Poutré, van
(Show Context)
Citation Context ...ary Datalog [16]. An algorithm is given in [16] for transforming an arbitrary Datalog query into an incremental query for arbitrary updates, but which is not in general nonrecursive. Graph algorithms =-=[21, 20, 26, 24]-=-. Graph algorithms for on-line evaluation of transitive closure of graphs are given in [21, 20], and a method to optimize transitive queries by using subtrees in graphs constructed in previous evaluat... |

35 |
Amortized Efficiency of a Path Retrieval Data Structure”, Theoreticul Computer Science 48
- Italiano
- 1986
(Show Context)
Citation Context ...ing definite logic programs [27]. Finally, when restricted to standard transitive closure programs, our task can be viewed as solving the incremental transitive closure computation problem for graphs =-=[10, 14, 20, 21]-=-. More detailed comparison will be given in Section 6. In general, all these optimization approaches store extra information to reduce the time required for subsequent computations. In our case, we st... |

32 |
On-line computation of transitive closure of graphs
- Ibaraki, Katoh
- 1983
(Show Context)
Citation Context ...ing definite logic programs [27]. Finally, when restricted to standard transitive closure programs, our task can be viewed as solving the incremental transitive closure computation problem for graphs =-=[10, 14, 20, 21]-=-. More detailed comparison will be given in Section 6. In general, all these optimization approaches store extra information to reduce the time required for subsequent computations. In our case, we st... |

23 |
Expressiveness of restricted recursive queries
- Afrati, Cosmadakis
- 1989
(Show Context)
Citation Context ...nly variables and binary predicate symbols. Chain Datalog programs and generalizations allow special optimization techniques. Indeed, several papers have considered efficiency issues of such programs =-=[1, 12, 13]-=-. The current paper also explores such possibilities. It is well known that, for each chain Datalog program P, the query (P; p) can be associated with a context-free grammar 2 G constructed as follows... |

19 |
A Data Structure for Arc Insertion and Regular Path Finding
- Buchsbaum, Kanellakis, et al.
- 1991
(Show Context)
Citation Context ...ing definite logic programs [27]. Finally, when restricted to standard transitive closure programs, our task can be viewed as solving the incremental transitive closure computation problem for graphs =-=[10, 14, 20, 21]-=-. More detailed comparison will be given in Section 6. In general, all these optimization approaches store extra information to reduce the time required for subsequent computations. In our case, we st... |

18 | IncrementM evaluation of rules and its relationship to parallelism
- Wolfson, Dewan, et al.
- 1991
(Show Context)
Citation Context ...etion of an edge, and gives nonrecursive queries for such computations for two classes of graphs (including the acyclic graphs). Incremental evaluation of Datalog : and its application to parallelism =-=[34]-=-. The approach in this work associates with each derived fact a collection of records of counters, one for each iteration in bottom-up evaluation. The counters remember the number of times the fact is... |

17 |
Decidability and undecidability results for boundedness of linear recursive queries
- Vardi
- 1988
(Show Context)
Citation Context ...es bounded Datalog queries. Since it is undecidable whether an arbitrary Datalog program is predicate bounded [18] (even when the program has only one IDB predicate and has only binary IDB predicates =-=[33]-=-), Lemma 2.3 implies the following result: Theorem 2.4 It is undecidable for each arbitrary query (P; p) whether there is an IEC of the form hP p ; fpg; P ffi i. This holds even for P having only one ... |

16 | Undecidable Boundedness Problems for Datalog Programs
- Hillebrand, Kanellakis, et al.
- 1995
(Show Context)
Citation Context ... CCI with respect to a given predicate. Proof The proof is based on a reduction from the halting problem of Turing machines on empty inputs. The reduction is modified from the one used by Vardi et al =-=[33, 19]-=- in proving the undecidability of boundedness for binary Datalog programs. We briefly describe their reduction and the changes below. Let M be a Turing machine with one-way infinite tape, an alphabet ... |

15 | Database programming with delayed updates
- Jacobs, Hull
- 1991
(Show Context)
Citation Context ...to compute the increment. Computing Datalog queries using IEC is also related to the bounded iteration constructs [30] and the more general treatment of database states and their differences (deltas) =-=[23]-=-. 7 Conclusions and Research Problems We have considered the incremental evaluation problem for Datalog queries. The main idea is to use the facts computed in one state to reduce the cost of computing... |

13 |
Maintenance of stratified databases viewed as a belief revision system
- Apt, Pugin
- 1987
(Show Context)
Citation Context ...straints were satisfied prior to the updates [9, 28, 29]. Our task is closely related to the problem of efficiently updating the standard model [2] of a definite or more generally stratified database =-=[4, 25]-=-. Our approach is very useful in maintaining materialized views upon updates. It is also closely related to the problem of partially evaluating definite logic programs [27]. Finally, when restricted t... |

12 |
Tools for Datalog boundedness
- Hillebrand, Kanellakis, et al.
- 1991
(Show Context)
Citation Context |

11 | A Time Bound on the Materialization of Some Recursively Defined Views 385 [Ioan] [Lewi] [Mink] [Naug] [Reit] [Sagi 1] [Sagi 2] [Ston] [Viei
- Ioannidis
- 1985
(Show Context)
Citation Context ...ation. 2 In the remainder of the section, we discuss the equivalence between "predicate boundedness" and the existence of IEC of a certain form. Predicate boundedness is a special case of bo=-=undedness [22, 18]-=-. A Datalog program P is called p-bounded, where p is a predicate, if there is a nonrecursive Datalog program P 0 such that P 0 (D)j p = P(D)j p for each database D. Lemma 2.3 Suppose P is an arbitrar... |

6 |
On Materializing Views and On-line Queries
- Jakobsson
- 1992
(Show Context)
Citation Context |

4 |
On Datalog Linearization of Chain Queries
- Dong
- 1991
(Show Context)
Citation Context |

4 |
Datalog Expressiveness of Chain Queries: Grammar Tools and Characterization
- Dong
- 1992
(Show Context)
Citation Context ...nly variables and binary predicate symbols. Chain Datalog programs and generalizations allow special optimization techniques. Indeed, several papers have considered efficiency issues of such programs =-=[1, 12, 13]-=-. The current paper also explores such possibilities. It is well known that, for each chain Datalog program P, the query (P; p) can be associated with a context-free grammar 2 G constructed as follows... |

4 |
First-order on-line computation of transitive closure queries
- Dong, Su
- 1993
(Show Context)
Citation Context |

4 |
On the efficient computation of the difference between consecutive database states
- uchenhoff
- 1991
(Show Context)
Citation Context |

2 |
On the expressive power of the bounded iteration construct
- Qian
- 1989
(Show Context)
Citation Context ...ural recursion is deterministic and one fact at a time, and uses nonrecursive queries to compute the increment. Computing Datalog queries using IEC is also related to the bounded iteration constructs =-=[30]-=- and the more general treatment of database states and their differences (deltas) [23]. 7 Conclusions and Research Problems We have considered the incremental evaluation problem for Datalog queries. T... |

1 |
Database Theory: From A to F. Manuscript
- Abiteboul, Hull, et al.
- 1994
(Show Context)
Citation Context ...onrecursive program. Note that nonrecursive programs define unions of conjunctive queries [11]. Such queries allow very efficient computations, and have received extensive attention in the literature =-=[3, 31]-=-. As we shall argue later, queries permitting incremental evaluation using conjunctive queries strictly generalize queries computable by nonrecursive programs. We assume familiarity with the relationa... |