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.
Supplemental Material
Available for Download
Online appendix to incremental XPath evaluation on article 29.
- 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 Scholar
- 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 ScholarDigital Library
- Balmin, A., Papakonstantinou, Y., and Vianu, V. 2004. Incremental validation of XML documents. ACM Trans. Datab. Syst. 29, 4, 710--751. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Benedikt, M., Fan, W., and Geerts, F. 2007. XPath satisfiability in the presence of DTDs. J. ACM 55, 2. Google ScholarDigital Library
- Benedikt, M. and Koch, C. 2008. XPath leashed. ACM Comput. Surv. 41, 1. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- Dong, G., Libkin, L., and Wong, L. 2003. Incremental recomputation in local languages. Inform. Comput. 181, 2, 88--98. Google ScholarDigital Library
- Dong, G. and Su, J. 2000. Incremental maintenance of recursive views using relational calculus/SQL*. SIGMOD Rec. 29, 1, 44--51. Google ScholarDigital Library
- Dong, G., Su, J., and Topor, R. 1995. Nonrecursive incremental evaluation of datalog queries. Ann. Math. Artifi. Intell. 14, 2--4, 187--223.Google ScholarCross Ref
- 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 Scholar
- 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 ScholarDigital Library
- Gottlob, G., Koch, C., and Pichler, R. 2005a. Efficient algorithms for processing XPath queries. ACM Trans. Datab. Syst. 30, 2, 444--491. Google ScholarDigital Library
- 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 ScholarDigital Library
- Götz, M., Koch, C., and Martens, W. 2009. Efficient algorithms for descendant-only tree pattern queries. Inform. Syst. 34, 7, 602--623. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Hoffmann, C. and O'Donnell, M. 1982. Pattern matching in trees. J. ACM 29, 1, 68--95. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Martens, W. and Neven, F. 2005. On the complexity of typechecking top-down XML transformations. Theor. Comput. Sci. 336, 1, 153--180. Google ScholarDigital Library
- 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 ScholarDigital Library
- Miklau, G. and Suciu, D. 2004. Containment and equivalence for a fragment of XPath. J. ACM 51, 1, 2--45. Google ScholarDigital Library
- Neven, F. 2002. Automata theory for XML researchers. Sigmod Rec. 31, 3, 39--46. Google ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Patnaik, S. and Immerman, N. 1997. Dyn-FO: A parallel, dynamic complexity class. J. Comput. Syst. Sci. 55, 2, 199--209. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Schwentick, T. 2004. XPath query containment. Sigmod Rec. 33, 1, 101--109. Google ScholarDigital Library
- 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 Scholar
- Simon, I. 1990. Factorization forests of finite height. Theoretical Comput. Sci. 72, 1, 65--94. Google ScholarDigital Library
- ten Cate, B. and Lutz, C. 2009. The complexity of query containment in expressive fragments of XPath 2.0. J. ACM 56, 6. Google ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Incremental XPath evaluation
Recommendations
Incremental maintenance for materialized XPath/XSLT views
WWW '05: Proceedings of the 14th international conference on World Wide WebThis paper proposes an incremental maintenance algorithm that efficiently updates the materialized XPath/XSLT views defined using XPath expressions in XP([],*,//,vars). The algorithm consists of two processes. 1) The dynamic execution flow of an XSLT ...
Incremental evaluation of a monotone XPath fragment
CIKM '05: Proceedings of the 14th ACM international conference on Information and knowledge managementThis paper shows a scheme for incremental evaluation of XPath queries. Here, we focus on a monotone fragment of XPath, i.e., when a data is deleted from (or inserted to) the database, only deletion (insertion, resp.) may occur to query answers. For ...
Reformulating XPath queries and XSLT queries on XSLT views
Applications using XML for data representation very often use different XML formats and thus require the transformation of XML data. The common approach transforms entire XML documents from one format into another, e.g. by using an XSLT stylesheet. ...
Comments