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

作者:

Highlights:

摘要

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–Fraı̈ssé 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.

论文关键词:

论文评审过程:Received 6 December 1995, Revised 9 October 1997, Available online 25 May 2002.

论文官网地址:https://doi.org/10.1006/jcss.1998.1565