Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Monadic Datalog and Regular Tree Pattern Queries

Published: 30 June 2016 Publication History
  • Get Citation Alerts
  • Abstract

    Containment of monadic datalog programs over trees is decidable. The situation is more complex when tree nodes carry labels from an infinite alphabet that can be tested for equality. It then matters whether the descendant relation is allowed or not: the descendant relation can be eliminated easily from monadic programs only when label equalities are not used. With descendant, even containment of linear monadic programs in unions of conjunctive queries is undecidable, and positive results are known only for bounded-depth trees.
    We show that without descendant, containment of connected monadic programs is decidable over ranked trees, but over unranked trees it is so only for linear programs. With descendant, it becomes decidable over unranked trees under restriction to downward programs: each rule only moves down from the node in the head. This restriction is motivated by regular tree pattern queries, a recent formalism in the area of ActiveXML, which we show to be equivalent to linear downward programs.

    References

    [1]
    Serge Abiteboul, Pierre Bourhis, Anca Muscholl, and Zhilin Wu. 2013. Recursive queries on trees and data trees. In Proceedings of the 2013 ICDT Conference. 93--104.
    [2]
    Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of Databases. Addison-Wesley.
    [3]
    Serge Abiteboul, Balder Ten Cate, and Yannis Katsis. 2011. On the equivalence of distributed systems with queries and communication. In Proceedings of the 2011 ICDT Conference. 126--137.
    [4]
    François Bancilhon and Raghu Ramakrishnan. 1986. An amateur’s introduction to recursive query processing strategies. In Proceedings of the 1986 SIGMOD Conference. ACM, New York, NY, 16--52.
    [5]
    Michael Benedikt, Pierre Bourhis, and Pierre Senellart. 2012. Monadic datalog containment. In Proceedings of the 2012 ICALP Conference. 79--91.
    [6]
    Michael Benedikt, Wenfei Fan, and Floris Geerts. 2008. XPath satisfiability in the presence of DTDs. Journal of the ACM 55, 2, Article No. 8.
    [7]
    Mikolaj Bojańczyk, Filip Murlak, and Adam Witkowski. 2015. Containment of monadic datalog programs via bounded clique-width. In Proceedings of the 2015 ICALP Conference. 427--439.
    [8]
    Piero A. Bonatti. 2004. On the decidability of containment of recursive datalog queries—preliminary report. In Proceedings of the 2004 PODS Conference. 297--306.
    [9]
    Diego Calvanese, Giuseppe De Giacomo, and Moshe Y. Vardi. 2005. Decidable containment of recursive queries. Theoretical Computer Science 336, 1, 33--56.
    [10]
    Stefano Ceri, Georg Gottlob, and Letizia Tanca. 1990. Logic Programming and Databases. Springer-Verlag New York, NY.
    [11]
    Surajit Chaudhuri and Moshe Y. Vardi. 1992. On the equivalence of recursive and nonrecursive datalog programs. In Proceedings of the 1992 PODS Conference. 55--66.
    [12]
    Stavros S. Cosmadakis, Haim Gaifman, Paris C. Kanellakis, and Moshe Y. Vardi. 1988. Decidable optimization problems for database logic programs (preliminary report). In Proceedings of the 1988 STOC Conference. 477--490.
    [13]
    Bruno Courcelle and Stephan Olariu. 2000. Upper bounds to the clique width of graphs. Discrete Applied Mathematics 101, 1--3, 77--114.
    [14]
    Diego Figueira. 2009. Satisfiability of downward XPath with data equality tests. In Proceedings of the 2009 PODS Conference. 197--206.
    [15]
    André Frochaux, Martin Grohe, and Nicole Schweikardt. 2014. Monadic datalog containment on trees. In Proceedings of the 2014 AMW Conference.
    [16]
    Haim Gaifman, Harry G. Mairson, Yehoshua Sagiv, and Moshe Y. Vardi. 1993. Undecidable optimization problems for database logic programs. Journal of the ACM 40, 3, 683--713.
    [17]
    Georg Gottlob and Christoph Koch. 2004. Monadic datalog and the expressive power of languages for Web information extraction. Journal of the ACM 51, 1, 74--113.
    [18]
    Georg Gottlob, Christoph Koch, and Klaus U. Schulz. 2006. Conjunctive queries over trees. Journal of the ACM 53, 2, 238--272.
    [19]
    Leonid Libkin. 2003. Expressive power of SQL. Theoretical Computer Science 296, 3, 379--404.
    [20]
    Filip Mazowiecki, Filip Murlak, and Adam Witkowski. 2014. Monadic datalog and regular tree pattern queries. In Proceedings of the 2014 MFCS Conference. 426--437.
    [21]
    Filip Mazowiecki, Joanna Ochremiak, and Adam Witkowski. 2015. Eliminating recursion from monadic datalog programs on trees. In Proceedings of the 2015 MFCS Conference.
    [22]
    Gerome Miklau and Dan Suciu. 2004. Containment and equivalence for a fragment of XPath. Journal of the ACM 51, 1, 2--45.
    [23]
    Jeffrey F. Naughton. 1989. Data independent recursion in deductive databases. Journal of Computer and System Sciences 38, 2, 259--289.
    [24]
    Frank Neven and Thomas Schwentick. 2006. On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. Logical Methods in Computer Science 2, 3, 1--30.
    [25]
    Oded Shmueli. 1993. Equivalence of datalog queries is undecidable. Journal of Logic Programming 15, 3, 231--241.
    [26]
    Moshe Y. Vardi. 1998. Reasoning about The past with two-way automata. In Proceedings of the 1998 ICALP Conference. 628--641.

    Index Terms

    1. Monadic Datalog and Regular Tree Pattern Queries

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Transactions on Database Systems
      ACM Transactions on Database Systems  Volume 41, Issue 3
      August 2016
      247 pages
      ISSN:0362-5915
      EISSN:1557-4644
      DOI:10.1145/2966276
      Issue’s Table of Contents
      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: 30 June 2016
      Accepted: 01 April 2016
      Revised: 01 February 2016
      Received: 01 August 2015
      Published in TODS Volume 41, Issue 3

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Recursive queries
      2. containment problem
      3. semistructured data
      4. trees

      Qualifiers

      • Research-article
      • Research
      • Refereed

      Funding Sources

      • Poland's National Science Center

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • 0
        Total Citations
      • 194
        Total Downloads
      • Downloads (Last 12 months)7
      • Downloads (Last 6 weeks)0
      Reflects downloads up to

      Other Metrics

      Citations

      View Options

      Get Access

      Login options

      Full Access

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media