skip to main content
research-article

Monadic Datalog, Tree Validity, and Limited Access Containment

Authors Info & Claims
Published:04 October 2019Publication History
Skip Abstract Section

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.

References

  1. Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of Databases. Pearson, London.Google ScholarGoogle Scholar
  2. Antoine Amarilli, Pierre Bourhis, and Pierre Senellart. 2015. Provenance Circuits for Trees and Treelike Instances (Extended Version). CoRR abs/1511.08723.Google ScholarGoogle Scholar
  3. Michael Benedikt, Pierre Bourhis, and Clemens Ley. 2015. Analysis of schemas with access restrictions. ACM Trans. Database Syst. 40, 1 (2015), 5.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Michael Benedikt, Pierre Bourhis, and Pierre Senellart. 2012. Monadic datalog containment. In Proceedings of the ICALP.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Michael Benedikt, Georg Gottlob, and Pierre Senellart. 2011. Determining relevance of accesses at runtime. In Proceedings of the PODS.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. Henrik Björklund, Wim Martens, and Thomas Schwentick. 2008. Optimizing conjunctive queries over trees using schema information. In Proceedings of the MFCS.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarCross RefCross Ref
  9. Henrik Björklund, Wim Martens, and Thomas Schwentick. 2016. Conjunctive query containment over trees using schema information. Acta Informatica (2016).Google ScholarGoogle Scholar
  10. Piero A. Bonatti. 2004. On the decidability of containment of recursive datalog queries. In Proceedings of the PODS.Google ScholarGoogle Scholar
  11. Andrea Calì and Diego Calvanese. 2006. Containment of conjunctive queries under access limitations. In Proceedings of the SEBD.Google ScholarGoogle Scholar
  12. Andrea Calì and Davide Martinenghi. 2008. Conjunctive query containment under access limitations. In Proceedings of the ER.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Diego Calvanese, Giuseppe De Giacomo, and Moshe Y. Vardi. 2005. Decidable containment of recursive queries. Theoret. Comput. Sci. 336, 1 (2005).Google ScholarGoogle Scholar
  14. 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 ScholarGoogle Scholar
  15. Ashok K. Chandra, Dexter Kozen, and Larry J. Stockmeyer. 1981. Alternation. J. ACM 28, 1 (1981).Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Surajit Chaudhuri and Moshe Y. Vardi. 1992. On the equivalence of recursive and nonrecursive datalog programs. In Proceedings of the PODS.Google ScholarGoogle Scholar
  17. Surajit Chaudhuri and Moshe Y. Vardi. 1994. On the complexity of equivalence between recursive and nonrecursive datalog programs. In Proceedings of the PODS.Google ScholarGoogle Scholar
  18. Surajit Chaudhuri and Moshe Y. Vardi. 1997. On the equivalence of recursive and nonrecursive datalog programs. J. Comput. Syst. Sci. 54, 1 (1997).Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle Scholar
  21. 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 ScholarGoogle Scholar
  22. Bruno Courcelle. 1991. Recursive queries and context-free graph grammars. Theoret. Comput. Sci. 78, 1 (1991).Google ScholarGoogle Scholar
  23. Oliver M. Duschka and Alon Y. Levy. 1997. Recursive plans for information gathering. In Proceedings of the IJCAI.Google ScholarGoogle Scholar
  24. 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 ScholarGoogle Scholar
  25. Chen Li and Edward Chang. 2001. Answering queries with useful bindings. Trans. Database Syst. 26, 3 (2001), 313–343.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. Frank Neven. 2002. Automata theory for XML researchers. SIGMOD Rec. 31, 3 (2002), 39–46. DOI:https://doi.org/10.1145/601858.601869Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Anand Rajaraman, Yehoshua Sagiv, and Jeffrey D. Ullman. 1995. Answering queries using templates with binding patterns. In Proceedings of the PODS.Google ScholarGoogle Scholar
  29. Neil Robertson and Paul D. Seymour. 1986. Graph minors. II. Algorithmic aspects of tree-width. J. Algor. 7, 3 (1986).Google ScholarGoogle ScholarCross RefCross Ref
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarCross RefCross Ref
  32. Balder ten Cate and Luc Segoufin. 2011. Unary negation. In Proceedings of the STACS.Google ScholarGoogle Scholar

Index Terms

  1. Monadic Datalog, Tree Validity, and Limited Access Containment

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Computational Logic
        ACM Transactions on Computational Logic  Volume 21, Issue 1
        January 2020
        271 pages
        ISSN:1529-3785
        EISSN:1557-945X
        DOI:10.1145/3361969
        • Editor:
        • Orna Kupferman
        Issue’s Table of Contents

        Copyright © 2019 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 October 2019
        • Accepted: 1 July 2019
        • Revised: 1 April 2019
        • Received: 1 November 2017
        Published in tocl Volume 21, Issue 1

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format .

      View HTML Format