Monadic Datalog, Tree Validity, and Limited Access Containment

We reconsider the problem of containment of monadic datalog (MDL) queries in unions of conjunctive queries (UCQs). Prior work has dealt with special cases of the problem but has left the precise complexity characterization open. In addition, the complexity of one important special case, that of containment under access patterns, was not known before. We start by revisiting the connection between MDL/UCQ containment and containment problems involving regular tree languages. We then present a general approach for getting tighter bounds on the complexity of query containment, based on analysis of the number of mappings of queries into tree-like instances. We give two applications of the machinery. We first give an important special case of the MDL/UCQ containment problem that is in EXPTIME, and we use this bound to show an EXPTIME bound on containment under access patterns. Second, we show that the same technique can be used to get a new tight upper bound for containment of tree automata in UCQs. We finally show that the new MDL/UCQ upper bounds are tight. We establish a 2EXPTIME lower bound on the MDL/UCQ containment problem, resolving an open problem from the early 1990s. This bound holds for the MDL/CQ containment problem as well. We also show that changes to the conditions given in our special cases can not be eliminated, and that in particular slight variations of the problem of containment under access patterns become 2EXPTIME-complete.

[1]  Ferenc Gécseg,et al.  Tree Languages , 1997, Handbook of Formal Languages.

[2]  Andrea Calì,et al.  Containment of Conjunctive Queries under Access Limitations , 2006, SEBD.

[3]  Hubert Comon,et al.  Tree automata techniques and applications , 1997 .

[4]  Balder ten Cate,et al.  Unary negation , 2013, Log. Methods Comput. Sci..

[5]  Thomas Schwentick,et al.  Validity of Tree Pattern Queries with Respect to Schema Information , 2013, MFCS.

[6]  Masako Takahashi,et al.  Generalizations of Regular Sets and Their Applicatin to a Study of Context-Free Languages , 1975, Inf. Control..

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

[8]  Michael Benedikt,et al.  Analysis of Schemas with Access Restrictions , 2015, TODS.

[9]  Piero A. Bonatti,et al.  On the decidability of containment of recursive datalog queries - preliminary report , 2004, PODS '04.

[10]  Georg Gottlob,et al.  Determining relevance of accesses at runtime , 2011, PODS.

[11]  Todd D. Millstein,et al.  Query containment for data integration systems , 2003, J. Comput. Syst. Sci..

[12]  Oded Shmueli,et al.  Equivalence of DATALOG Queries is Undecidable , 1993, J. Log. Program..

[13]  Diego Calvanese,et al.  Containment of Conjunctive Regular Path Queries with Inverse , 2000, KR.

[14]  Haim Gaifman,et al.  Decidable optimization problems for database logic programs , 1988, STOC '88.

[15]  Thomas Colcombet,et al.  The Complexity of Boundedness for Guarded Logics , 2015, 2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science.

[16]  Bogdan S. Chlebus Domino-Tiling Games , 1986, J. Comput. Syst. Sci..

[17]  Thomas Schwentick,et al.  Optimizing Conjunctive Queries over Trees Using Schema Information , 2008, MFCS.

[18]  Michael Benedikt,et al.  Monadic Datalog Containment , 2012, ICALP.

[19]  Frank Neven,et al.  Automata theory for XML researchers , 2002, SGMD.

[20]  Surajit Chaudhuri,et al.  On the equivalence of recursive and nonrecursive datalog programs , 1992, J. Comput. Syst. Sci..

[21]  Andrea Calì,et al.  Conjunctive Query Containment under Access Limitations , 2008, ER.

[22]  Paul D. Seymour,et al.  Graph Minors. II. Algorithmic Aspects of Tree-Width , 1986, J. Algorithms.

[23]  Pierre Senellart,et al.  Provenance Circuits for Trees and Treelike Instances , 2015, ICALP.

[24]  Surajit Chaudhuri,et al.  On the complexity of equivalence between recursive and nonrecursive Datalog programs , 1994, PODS '94.

[25]  Bruno Courcelle,et al.  Recursive Queries and Context-free Graph Grammars , 1991, Theor. Comput. Sci..

[26]  Alon Y. Halevy,et al.  Recursive Plans for Information Gathering , 1997, IJCAI.

[27]  Edward Y. Chang,et al.  Answering queries with useful bindings , 2001, TODS.

[28]  Diego Calvanese,et al.  Decidable containment of recursive queries , 2003, Theor. Comput. Sci..

[29]  Thomas Schwentick,et al.  Conjunctive query containment over trees using schema information , 2018, Acta Informatica.

[30]  Anand Rajaraman,et al.  Answering queries using templates with binding patterns (extended abstract) , 1995, PODS.