skip to main content
research-article

Incremental XPath evaluation

Published:12 October 2010Publication History
Skip Abstract Section

Abstract

Incremental view maintenance for XPath queries asks to maintain a materialized XPath view over an XML database. It assumes an underlying XML database D and a query Q. One is given a sequence of updates U to D, and the problem is to compute the result of Q(U(D)): the result of evaluating query Q on database D after having applied updates U. This article initiates a systematic study of the Boolean version of this problem. In the Boolean version, one only wants to know whether Q(U(D)) is empty or not.

In order to quickly answer this question, we are allowed to maintain an auxiliary data structure. The complexity of the maintenance algorithms is measured in, (1) the size of the auxiliary data structure, (2) the worst-case time per update needed to compute Q(U(D)), and (3) the worst-case time per update needed to bring the auxiliary data structure up to date. We allow three kinds of updates: node insertion, node deletion, and node relabeling. Our main results are that downward XPath queries can be incrementally maintained in time O(depth(D)·poly(|Q|)) per update and conjunctive forward XPath queries in time O(depth(D) · log(width(D))·poly(|Q|)) per update, where |Q| is the size of the query, and depth(D) and width(D) are the nesting depth and maximum number of siblings in database D, respectively. The auxiliary data structures for maintenance are linear in |D| and polynomial in |Q| in all these cases.

Skip Supplemental Material Section

Supplemental Material

References

  1. Abiteboul, S., Bourhis, P., and Marinoiu, B. 2007. Incremental view maintenance for active documents. In Journées Bases de Données Avancées (BDA).Google ScholarGoogle Scholar
  2. Abiteboul, S., Bourhis, P., and Marinoiu, B. 2009. Efficient maintenance techniques for views over active documents. In Proceedings of the International Conference on Extending Database Technology (EDBT). ACM Press, New York, 1076--1087. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Balmin, A., Papakonstantinou, Y., and Vianu, V. 2004. Incremental validation of XML documents. ACM Trans. Datab. Syst. 29, 4, 710--751. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bar-Yossef, Z., Fontoura, M., and Josifovski, V. 2007. On the memory requirements of XPath evaluation over XML streams. J. Comput. Syst. Sci. 73, 3, 391--441. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Barbosa, D., Mendelzon, A., Libkin, L., Mignet, L., and Arenas, M. 2004. Efficient incremental validation of XML documents. In Proceedings of the International Conference on Data Engineering (ICDE). IEEE Computer Society, Washington DC, 671--682. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Benedikt, M., Fan, W., and Geerts, F. 2007. XPath satisfiability in the presence of DTDs. J. ACM 55, 2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Benedikt, M. and Koch, C. 2008. XPath leashed. ACM Comput. Surv. 41, 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Björklund, H., Gelade, W., Marquardt, M., and Martens, W. 2009. Incremental XPath evaluation. In Proceedings of the International Conference on Database Theory (ICDT). ACM Press, New York, 162--173. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Bojańczyk, M. and Parys, P. 2008. XPath evaluation in linear time. In Proceedings of the International Symposium on Principles of Database Systems (PODS). ACM Press, New York, 241--250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Clark, J. and DeRose, S. 1999. XML Path Language (XPath) version 1.0. Tech. rep., World Wide Web Consortium. http://www.w3.org/TR/xpath/.Google ScholarGoogle Scholar
  11. Dong, G., Libkin, L., Su, J., and Wong, L. 1999. Maintaining transitive closure of graphs in SQL. Int. J. Inform. Technol. 5, 1, 46--78.Google ScholarGoogle Scholar
  12. Dong, G., Libkin, L., and Wong, L. 2003. Incremental recomputation in local languages. Inform. Comput. 181, 2, 88--98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dong, G. and Su, J. 2000. Incremental maintenance of recursive views using relational calculus/SQL*. SIGMOD Rec. 29, 1, 44--51. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dong, G., Su, J., and Topor, R. 1995. Nonrecursive incremental evaluation of datalog queries. Ann. Math. Artifi. Intell. 14, 2--4, 187--223.Google ScholarGoogle ScholarCross RefCross Ref
  15. Gelade, W., Marquardt, M., and Schwentick, T. 2009. The dynamic complexity of formal languages. In Proceedings of the Annual Symposium on Theoretical Aspects of Computer Science (STACS). Schloss Dagstuhl—Leibniz-Zentrum für Informatik, Germany, 481--492.Google ScholarGoogle Scholar
  16. Glaister, I. and Shallit, J. 1996. A lower bound technique for the size of nondeterministic finite automata. Inform. Proc. Lett. 59, 2, 75--77. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gottlob, G., Koch, C., and Pichler, R. 2005a. Efficient algorithms for processing XPath queries. ACM Trans. Datab. Syst. 30, 2, 444--491. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Gottlob, G., Koch, C., Pichler, R., and Segoufin, L. 2005b. The complexity of XPath query evaluation and XML typing. J. ACM 52, 2, 284--335. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Götz, M., Koch, C., and Martens, W. 2009. Efficient algorithms for descendant-only tree pattern queries. Inform. Syst. 34, 7, 602--623. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Griffin, T. and Libkin, L. 1995. Incremental maintenance of views with duplicates. In Proceedings of the International Symposium on Management of Data (SIGMOD). ACM Press, New York, 328--339. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Grohe, M., Koch, C., and Schweikardt, N. 2007. Tight lower bounds for query processing on streaming and external memory data. Theoretical Comput. Sci. 380, 1--2, 199--217. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Gupta, A., Mumick, I. S., and Subrahmanian, V. 1993. Maintaining views incrementally. In Proceedings of the International Symposium on Management of Data (SIGMOD). ACM Press, New York, 157--166. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Hoffmann, C. and O'Donnell, M. 1982. Pattern matching in trees. J. ACM 29, 1, 68--95. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Koch, C. 2010. Incremental query evaluation in a ring of databases. In Proceedings of the International Symposium on Principles of Database Systems (PODS). ACM Press, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Libkin, L. and Sirangelo, C. 2008. Reasoning about XML with temporal logics and automata. In Proceedings of the International Symposium on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR). Springer, Germany, 97--112. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Libkin, L. and Wong, L. 1997. Incremental recomputation of recursive queries with nested sets and aggregate functions. In Proceedings of the International Symposium on Database Programming Languages (DBPL). Springer, Germany, 222--238. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Liu, J., Vincent, M., and Mohania, M. 1999. Incremental maintenance of nested relational views. In Proceedings of the International Database Engineering and Applications Symposium (IDEAS). 197--205. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Martens, W. and Neven, F. 2005. On the complexity of typechecking top-down XML transformations. Theor. Comput. Sci. 336, 1, 153--180. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Matsumura, H. and Tajima, K. 2005. Incremental evaluation of a monotone XPath fragment. In Proceedings of the ACM Conference on Information and Knowledge Management (CIKM). ACM Press, New York, 245--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Miklau, G. and Suciu, D. 2004. Containment and equivalence for a fragment of XPath. J. ACM 51, 1, 2--45. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Neven, F. 2002. Automata theory for XML researchers. Sigmod Rec. 31, 3, 39--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Neven, F. and Schwentick, T. 2006. On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. Logical Methods Comput. Sci. 2, 3.Google ScholarGoogle ScholarCross RefCross Ref
  33. O'Neil, P., O'Neil, E., Pal, S., Cseri, I., Schaller, G., and Westbury, N. 2004. ORDPATHs: Insert-friendly XML node labels. In Proceedings of the International Symposium on Management of Data (SIGMOD). ACM Press, New York, 903--908. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Onizuka, M., Chan, F. Y., Michigami, R., and Honishi, T. 2005. Incremental maintenance for materialized XPath/XSLT views. In Proceedings of the World Wide Web Conference (WWW). ACM Press, New York, 671--681. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Pang, C., Dong, G., and Ramamohanarao, K. 2005. Incremental maintenance of shortest distance and transitive closure in first-order logic and SQL. ACM Trans. Datab. Syst. 30, 3, 698--721. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Parys, P. 2009. XPath evaluation in linear time with polynomial combined complexity. In Proceedings of the International Symposium on Principles of Database Systems (PODS). ACM Press, New York, 55--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Patnaik, S. and Immerman, N. 1997. Dyn-FO: A parallel, dynamic complexity class. J. Comput. Syst. Sci. 55, 2, 199--209. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Sawires, A., Tatemura, J., Po, O., Agrawal, D., Abbadi, A. E., and Candan, K. S. 2006. Maintaining XPath views in loosely coupled systems. In Proceedings of the International Conference on Very Large Data Bases (VLDB). ACM Press, New York, 583--594. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Sawires, A., Tatemura, J., Po, O., Agrawal, D., and Candan, K. S. 2005. Incremental maintenance of path-expression views. In Proceedings of the International Symposium on Management of Data (SIGMOD). ACM Press, New York, 443--454. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Schweikardt, N. 2007. Machine models and lower bounds for query processing. In Proceedings of the International Symposium on Principles of Database Systems (PODS). ACM Press, New York, 41--52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Schwentick, T. 2004. XPath query containment. Sigmod Rec. 33, 1, 101--109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Shmueli, O. and Itai, A. 1984. Incremental view maintenance. In Proceedings of the International Symposium on Management of Data (SIGMOD). ACM Press, New York, 240--255.Google ScholarGoogle Scholar
  43. Simon, I. 1990. Factorization forests of finite height. Theoretical Comput. Sci. 72, 1, 65--94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. ten Cate, B. and Lutz, C. 2009. The complexity of query containment in expressive fragments of XPath 2.0. J. ACM 56, 6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Vardi, M. Y. 1998. Reasoning about the past with two-way automata. In Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP). Springer, Germany, 628--641. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Incremental XPath evaluation

              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 Database Systems
                ACM Transactions on Database Systems  Volume 35, Issue 4
                November 2010
                230 pages
                ISSN:0362-5915
                EISSN:1557-4644
                DOI:10.1145/1862919
                Issue’s Table of Contents

                Copyright © 2010 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: 12 October 2010
                • Accepted: 1 May 2010
                • Revised: 1 March 2010
                • Received: 1 October 2009
                Published in tods Volume 35, Issue 4

                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