Dynamic Complexity under Definable Changes

In the setting of dynamic complexity, the goal of a dynamic program is to maintain the result of a fixed query for an input database that is subject to changes, possibly using additional auxiliary relations. In other words, a dynamic program updates a materialized view whenever a base relation is changed. The update of query result and auxiliary relations is specified using first-order logic or, equivalently, relational algebra. The original framework by Patnaik and Immerman only considers changes to the database that insert or delete single tuples. This article extends the setting to definable changes, also specified by first-order queries on the database, and generalizes previous maintenance results to these more expressive change operations. More specifically, it is shown that the undirected reachability query is first-order maintainable under single-tuple changes and first-order defined insertions, likewise the directed reachability query for directed acyclic graphs is first-order maintainable under insertions defined by quantifier-free first-order queries. These results rely on bounded bridge properties, which basically say that, after an insertion of a defined set of edges, for each connected pair of nodes there is some path with a bounded number of new edges. While this bound can be huge, in general, it is shown to be small for insertion queries defined by unions of conjunctive queries. To illustrate that the results for this restricted setting could be practically relevant, they are complemented by an experimental study that compares the performance of dynamic programs with complex changes, dynamic programs with single changes, and with recomputation from scratch. The positive results are complemented by several inexpressibility results. For example, it is shown that—unlike for single-tuple insertions—dynamic programs that maintain the reachability query under definable, quantifier-free changes strictly need update formulas with quantifiers. Finally, further positive results unrelated to reachability are presented: it is shown that for changes definable by parameter-free first-order formulas, all LOGSPACE-definable (and even AC1-definable) queries can be maintained by first-order dynamic programs.

[1]  Jianwen Su,et al.  Nonrecursive incremental evaluation of Datalog queries , 1995, Annals of Mathematics and Artificial Intelligence.

[2]  Thomas Zeume,et al.  The dynamic descriptive complexity of k-clique , 2014, Inf. Comput..

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

[4]  Christoph Koch,et al.  Incremental query evaluation in a ring of databases , 2010, PODS.

[5]  Jianwen Su,et al.  Arity Bounds in First-Order Incremental Evaluation and Definition of Polynomial Time Database Queries , 1998, J. Comput. Syst. Sci..

[6]  Jianwen Su,et al.  Maintaining Transitive Closure of Graphs in SQL , 1999 .

[7]  George H. L. Fletcher,et al.  gMark: Schema-Driven Generation of Graphs and Queries , 2017, 2017 IEEE 33rd International Conference on Data Engineering (ICDE).

[8]  Thomas Schwentick,et al.  Dynamic complexity: recent updates , 2016, SIGL.

[9]  Thomas Schwentick,et al.  On Winning Ehrenfeucht Games and Monadic NP , 1996, Ann. Pure Appl. Log..

[10]  Thomas Schwentick,et al.  Dynamic Complexity under Definable Changes , 2017, TODS.

[11]  Thomas Schwentick,et al.  A Strategy for Dynamic Programs: Start over and Muddle through , 2019, Log. Methods Comput. Sci..

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

[13]  S. Feferman,et al.  The first order properties of products of algebraic systems , 1959 .

[14]  Thomas Schwentick,et al.  On the quantifier-free dynamic complexity of Reachability , 2015, Inf. Comput..

[15]  Georg Gottlob,et al.  The complexity of acyclic conjunctive queries , 2001, JACM.

[16]  Surajit Chaudhuri,et al.  Maintenance of Materialized Views: Problems, Techniques, and Applications. , 1995 .

[17]  Thomas Zeume,et al.  Small dynamic complexity classes , 2015 .

[18]  Jan Van den Bussche,et al.  On the expressive power of update primitives , 2013, PODS.

[19]  Serge Abiteboul,et al.  Foundations of Databases: The Logical Level , 1995 .

[20]  Neil Immerman,et al.  Complete problems for dynamic complexity classes , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[21]  Ling Liu,et al.  Encyclopedia of Database Systems , 2009, Encyclopedia of Database Systems.

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

[23]  Dimitra Vista,et al.  Integration of Incremental View Maintenance into Query Optimizers , 1998, EDBT.

[24]  Thomas Schwentick,et al.  Dynamic Complexity Theory Revisited , 2005, Theory of Computing Systems.

[25]  Inderpal Singh Mumick,et al.  The Stanford Data Warehousing Project , 1995 .

[26]  Kousha Etessami,et al.  Dynamic Tree Isomorphism via First-Order Updates. , 1998, PODS 1998.

[27]  Jianwen Su,et al.  Deterministic FOIES are strictly weaker , 2004, Annals of Mathematics and Artificial Intelligence.

[28]  Thomas Schwentick,et al.  On the quantifier-free dynamic complexity of Reachability , 2013, Inf. Comput..

[29]  Limsoon Wong,et al.  Incremental recomputation in local languages , 2003, Inf. Comput..

[30]  Guozhu Dong,et al.  Incremental Evaluation of Datalog Queries , 1992, ICDT.

[31]  Johann A. Makowsky,et al.  Algorithmic uses of the Feferman-Vaught Theorem , 2004, Ann. Pure Appl. Log..

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

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

[34]  Kousha Etessami,et al.  Dynamic tree isomorphism via first-order updates to a relational database , 1998, PODS '98.

[35]  Thomas Schwentick,et al.  Dynamic conjunctive queries , 2017, J. Comput. Syst. Sci..

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

[37]  Kotagiri Ramamohanarao,et al.  Incremental maintenance of shortest distance and transitive closure in first-order logic and SQL , 2005, TODS.

[38]  Milos Nikolic,et al.  DBToaster: Higher-order Delta Processing for Dynamic, Frequently Fresh Views , 2012, Proc. VLDB Endow..

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

[40]  Thomas Schwentick,et al.  Reachability Is in DynFO , 2015, ICALP.

[41]  Leonid Libkin,et al.  Elements of Finite Model Theory , 2004, Texts in Theoretical Computer Science.

[42]  Thomas Zeume,et al.  Reachability and Distances under Multiple Changes , 2018, ICALP.

[43]  Thomas Schwentick,et al.  The dynamic complexity of formal languages , 2008, TOCL.

[44]  Sebastian Siebertz,et al.  Dynamic definability , 2012, ICDT '12.

[45]  Raghav Kulkarni,et al.  Dynamic Complexity of Directed Reachability and Other Problems , 2014, ICALP.

[46]  Krzysztof Stencel,et al.  Recursive Query Facilities in Relational Databases: A Survey , 2010, FGIT-DTA/BSBT.

[47]  David Eppstein,et al.  Dynamic graph algorithms , 2010 .