Abstract
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.
- Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of Databases. Pearson, London.Google Scholar
- Antoine Amarilli, Pierre Bourhis, and Pierre Senellart. 2015. Provenance Circuits for Trees and Treelike Instances (Extended Version). CoRR abs/1511.08723.Google Scholar
- Michael Benedikt, Pierre Bourhis, and Clemens Ley. 2015. Analysis of schemas with access restrictions. ACM Trans. Database Syst. 40, 1 (2015), 5.Google ScholarDigital Library
- Michael Benedikt, Pierre Bourhis, and Pierre Senellart. 2012. Monadic datalog containment. In Proceedings of the ICALP.Google ScholarDigital Library
- Michael Benedikt, Georg Gottlob, and Pierre Senellart. 2011. Determining relevance of accesses at runtime. In Proceedings of the PODS.Google ScholarDigital Library
- Michael Benedikt, Balder ten Cate, Thomas Colcombet, and Michael Vanden Boom. 2015. The complexity of boundedness for guarded logics. In Proceedings of the LICS. Retrieved from https://www.cs.ox.ac.uk/people/michael.vandenboom/papers/LICS15-gnfpb-long.pdf.Google ScholarDigital Library
- Henrik Björklund, Wim Martens, and Thomas Schwentick. 2008. Optimizing conjunctive queries over trees using schema information. In Proceedings of the MFCS.Google ScholarDigital Library
- Henrik Björklund, Wim Martens, and Thomas Schwentick. 2013. Validity of tree pattern queries with respect to schema information. In Proceedings of the MFCS.Google ScholarCross Ref
- Henrik Björklund, Wim Martens, and Thomas Schwentick. 2016. Conjunctive query containment over trees using schema information. Acta Informatica (2016).Google Scholar
- Piero A. Bonatti. 2004. On the decidability of containment of recursive datalog queries. In Proceedings of the PODS.Google Scholar
- Andrea Calì and Diego Calvanese. 2006. Containment of conjunctive queries under access limitations. In Proceedings of the SEBD.Google Scholar
- Andrea Calì and Davide Martinenghi. 2008. Conjunctive query containment under access limitations. In Proceedings of the ER.Google ScholarDigital Library
- Diego Calvanese, Giuseppe De Giacomo, and Moshe Y. Vardi. 2005. Decidable containment of recursive queries. Theoret. Comput. Sci. 336, 1 (2005).Google Scholar
- Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Moshe Y. Vardi. 2000. Containment of conjunctive regular path queries with inverse. In Proceedings of the KR.Google Scholar
- Ashok K. Chandra, Dexter Kozen, and Larry J. Stockmeyer. 1981. Alternation. J. ACM 28, 1 (1981).Google ScholarDigital Library
- Surajit Chaudhuri and Moshe Y. Vardi. 1992. On the equivalence of recursive and nonrecursive datalog programs. In Proceedings of the PODS.Google Scholar
- Surajit Chaudhuri and Moshe Y. Vardi. 1994. On the complexity of equivalence between recursive and nonrecursive datalog programs. In Proceedings of the PODS.Google Scholar
- Surajit Chaudhuri and Moshe Y. Vardi. 1997. On the equivalence of recursive and nonrecursive datalog programs. J. Comput. Syst. Sci. 54, 1 (1997).Google ScholarDigital Library
- Bogdan S. Chlebus. 1986. Domino-tiling games. J. Comput. Syst. Sci. 32, 3 (1986), 374–392. DOI:https://doi.org/10.1016/0022-0000(86)90036-XGoogle ScholarDigital Library
- Hubert Comon, Max Dauchet, Rémi Gilleron, Florent Jacquemard, Denis Lugiez, Sophie Tison, and Marc Tommasi. 2002. Tree Automata Techniques and Applications. Retrieved from http://www.grappa.univ-lille3.fr/tata/.Google Scholar
- Stavros S. Cosmadakis, Haim Gaifman, Paris C. Kanellakis, and Moshe Y. Vardi. 1988. Decidable optimization problems for database logic programs. In Proceedings of the STOC.Google Scholar
- Bruno Courcelle. 1991. Recursive queries and context-free graph grammars. Theoret. Comput. Sci. 78, 1 (1991).Google Scholar
- Oliver M. Duschka and Alon Y. Levy. 1997. Recursive plans for information gathering. In Proceedings of the IJCAI.Google Scholar
- Ferenc Gécseg and Magnus Steinby. 1997. “Tree languages.” In Handbook of Formal Languages, G. Rozenberg and A. Salomaa (Eds.). Vol. 3. Springer Verlag, 1–68.Google Scholar
- Chen Li and Edward Chang. 2001. Answering queries with useful bindings. Trans. Database Syst. 26, 3 (2001), 313–343.Google ScholarDigital Library
- Todd D. Millstein, Alon Y. Halevy, and Marc Friedman. 2003. Query containment for data integration systems. J. Comput. Syst. Sci. 66, 1 (2003), 20–39.Google ScholarDigital Library
- Frank Neven. 2002. Automata theory for XML researchers. SIGMOD Rec. 31, 3 (2002), 39–46. DOI:https://doi.org/10.1145/601858.601869Google ScholarDigital Library
- Anand Rajaraman, Yehoshua Sagiv, and Jeffrey D. Ullman. 1995. Answering queries using templates with binding patterns. In Proceedings of the PODS.Google Scholar
- Neil Robertson and Paul D. Seymour. 1986. Graph minors. II. Algorithmic aspects of tree-width. J. Algor. 7, 3 (1986).Google ScholarCross Ref
- Oded Shmueli. 1993. Equivalence of datalog queries is undecidable. J. Log. Program. 15, 3 (1993). DOI:https://doi.org/10.1016/0743-1066(93)90040-NGoogle ScholarDigital Library
- Masako Takahashi. 1975. Generalizations of regular sets and their application to a study of context-free languages. Info. Control 27, 1 (1975), 1–36.Google ScholarCross Ref
- Balder ten Cate and Luc Segoufin. 2011. Unary negation. In Proceedings of the STACS.Google Scholar
Index Terms
- Monadic Datalog, Tree Validity, and Limited Access Containment
Recommendations
Query containment for data integration systems
Special issue on PODS 2000The problem of query containment is fundamental to many aspects of database systems, including query optimization, determining independence of queries from updates, and rewriting queries using views. In the data-integration framework, however, the ...
Decidable containment of recursive queries
Database theoryOne of the most important reasoning tasks on queries is checking containment, i.e., verifying whether one query yields necessarily a subset of the result of another one. Query containment is crucial in several contexts, such as query optimization, query ...
Monadic datalog containment
ICALP'12: Proceedings of the 39th international colloquium conference on Automata, Languages, and Programming - Volume Part IIWe reconsider the problem of containment of monadic datalog (MDL) queries in unions of conjunctive queries (UCQs). Prior work has dealt with special cases, but has left the precise complexity characterization open. We begin by establishing a 2EXPTIME ...
Comments