Arity Bounds in First-Order Incremental Evaluation and Definition of Polynomial Time Database Queries

After inserting a tuple into or deleting a tuple from a database, a first-order incremental evaluation system (or a “foies”) for a database query derives the new query answer by using a first-order query on the new database, the old answer, and perhaps some stored auxiliary relations. Moreover, the auxiliary relations must also be maintained similarly using first-order queries. In this paper we measure the space needed by foies in terms of the maximal arity of the auxiliary relations and present results on the existence and nonexistence of such space-restricted foies for a variety of graph queries, including counting and transitive closure. We construct space efficient foies for these queries and show that the arity bounds are tight using Ehrenfeucht?Frai?sse games. In particular, for transitive closure over undirected graphs, the minimum arity bound of its foies is shown to be exactly two; this resolves an open problem raised by Patnaik and Immerman in 1994. For the general case, we show that the arity-based hierarchy is strict for all arities. The strictness proof uses queries with input relations having arities much larger than the auxiliary relations. It is still open whether the hierarchy remains strict for arities two or greater when the input relations of queries have arities bounded by a fixed number, such as two, or by the arities of the auxiliary relations. Finally, we consider a variation of foies where the cost of storing the answer to the query is also “charged.” We show that the arity hierarchy in this case is also strict. The positions of queries in the two arity-based hierarchies can differ; we give the positions in this hierarchy of the queries considered for the other arity hierarchy.

[1]  Jianwen Su,et al.  First-Order Incremental Evaluation of Datalog Queries , 1993, DBPL.

[2]  Kenneth A. Ross,et al.  Efficient Incremental Evaluation of Queries with Aggregation , 1994, ILPS.

[3]  Frank Wm. Tompa,et al.  Efficiently updating materialized views , 1986, SIGMOD '86.

[4]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[5]  R. Stephenson A and V , 1962, The British journal of ophthalmology.

[6]  Inderpal Singh Mumick,et al.  Incremental Evaluation Of Datalog Queries , 1999 .

[7]  Jianwen Su,et al.  Increment Boundedness and Nonrecursive Incremental Evaluation of Datalog Queries , 1995, ICDT.

[8]  Jianwen Su,et al.  Incremental and Decremental Evaluation of Transitive Closure by First-Order Queries , 1995, Inf. Comput..

[9]  Ronald Fagin,et al.  On Monadic NP vs. Monadic co-NP , 1995, Inf. Comput..

[10]  Salvatore J. Stolfo,et al.  Incremental evaluation of rules and its relationship to parallelism , 1991, SIGMOD '91.

[11]  A. Ehrenfeucht An application of games to the completeness problem for formalized theories , 1961 .

[12]  Jin-Yi Cai Lower bounds for constant depth circuits in the presence of help bits , 1989, 30th Annual Symposium on Foundations of Computer Science.

[13]  Jianwen Su,et al.  Finitely Representable Databases , 1997, J. Comput. Syst. Sci..

[14]  Martin C. Carlisle,et al.  Determining Uni-Connectivity in Directed Graphs , 1993, Inf. Process. Lett..

[15]  Ronald Fagin,et al.  Reachability is harder for directed than for undirected finite graphs , 1988, [Proceedings 1988] 29th Annual Symposium on Foundations of Computer Science.

[16]  Krzysztof R. Apt,et al.  Maintenance of stratified databases viewed as a belief revision system , 1987, PODS.

[17]  Guozhu Dong Separating Auxiliary Arity Hierarchy of First-Order Incremental Evaluation Using (3+1)-ary Input Relations , 1997 .

[18]  David Harel,et al.  Structure and complexity of relational queries , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[19]  Limsoon Wong,et al.  On Impossibility of Decremental Recomputation of Recursive Queries in Relational Calculus and SQL , 1995, DBPL.

[20]  Leonid Libkin,et al.  Incremental maintenance of views with duplicates , 1995, SIGMOD '95.

[21]  Ronald Fagin,et al.  Monadic generalized spectra , 1975, Math. Log. Q..

[22]  Volker Küchenhoff On the Efficient Computation of the Difference Between Concecutive Database States , 1991, DOOD.

[23]  V. S. Subrahmanian,et al.  Maintaining views incrementally , 1993, SIGMOD Conference.

[24]  Peter Bro Miltersen,et al.  Complexity Models for Incremental Computation , 1994, Theor. Comput. Sci..

[25]  Richard Hull Relative Information Capacity of Simple Relational Database Schemata , 1986, SIAM J. Comput..

[26]  Neil Immerman,et al.  Dyn-FO: A Parallel, Dynamic Complexity Class , 1997, J. Comput. Syst. Sci..

[27]  Chaoyi Pang,et al.  Maintaining Transitive Closure in First Order After Node-Set and Edge-Set Deletions , 1997, Inf. Process. Lett..