Commutativity Analysis in XML Update Languages

  • Giorgio Ghelli
  • Kristoffer Rose
  • Jérôme Siméon
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4353)


A common approach to XML updates is to extend XQuery with update operations. This approach results in very expressive languages which are convenient for users but are difficult to reason about. Deciding whether two expressions can commute has numerous applications from view maintenance to rewriting-based optimizations. Unfortunately, commutativity is undecidable in most recent XML update languages. In this paper, we propose a conservative analysis for an expressive XML update language that can be used to determine whether two expressions commute. The approach relies on a form of path analysis that computes upper bounds for the nodes that are accessed or modified in a given update expression. Our main result is a commutativity theorem that can be used to identify commuting expressions.


Path Analysis Expressive Language Path Disjointness Query Evaluation Path Expression 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Chamberlin, D., Florescu, D., Robie, J.: XQuery update facility. W3C Working Draft (2006)Google Scholar
  2. 2.
    Lehti, P.: Design and implementation of a data manipulation processor for an XML query processor, Technical University of Darmstadt, Germany, Diplomarbeit (2001)Google Scholar
  3. 3.
    Tatarinov, I., Ives, Z., Halevy, A., Weld, D.: Updating XML. In: SIGMOD (2001)Google Scholar
  4. 4.
    Benedikt, M., Bonifati, A., Flesca, S., Vyas, A.: Adding updates to XQuery: Semantics, optimization, and static analysis. In: XIME-P 2005 (2005)Google Scholar
  5. 5.
    Ghelli, G., Ré, C., Siméon, J.: XQuery!: An XML query language with side effects. In: DataX Workshop, Munich, Germany. LNCS, Springer, Heidelberg (2006)Google Scholar
  6. 6.
    Boag, S., Chamberlin, D., Fernandez, M.F., Florescu, D., Robie, J., Siméon, J.: XQuery 1.0: An XML query language (2006)Google Scholar
  7. 7.
    Carey, M., Chamberlin, D., Florescu, D., Robie, J.: Programming with XQuery. Draft submitted for publication (2006)Google Scholar
  8. 8.
    Marian, A., Simeon, J.: Projecting XML documents. In: Proceedings of International Conference on Very Large Databases (VLDB), Berlin, Germany, pp. 213–224 (2003)Google Scholar
  9. 9.
    Benedikt, M., Fan, W., Kuper, G.M.: Structural properties of xpath fragments. Theor. Comput. Sci. 336(1), 3–31 (2005)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Miklau, G., Suciu, D.: Containment and equivalence for a fragment of xpath. J. ACM 51(1), 2–45 (2004)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Elkan, C.: Independence of logic database queries and updates. In: PODS, pp. 154–160 (1990)Google Scholar
  12. 12.
    Levy, A.Y., Sagiv, Y.: Queries independent of updates. In: Proceedings of 19th International Conference on Very Large Data Bases, Dublin, Ireland, August 24-27, pp. 171–181. Morgan Kaufmann, San Francisco (1993)Google Scholar
  13. 13.
    Benedikt, M., Bonifati, A., Flesca, S., Vyas, A.: Verification of tree updates for optimization. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 379–393. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  14. 14.
    Dekeyser, S., Hidders, J., Paredaens, J.: A transaction model for xml databases. World Wide Web 7(1), 29–57 (2004)CrossRefGoogle Scholar
  15. 15.
    Lanin, V., Shasha, D.: A symmetric concurrent b-tree algorithm. In: FJCC, pp. 380–389 (1986)Google Scholar
  16. 16.
    Ghelli, G., Rose, K., Siméon, J.: Commutativity analysis in XML update languages (2006),
  17. 17.
    Fernández, M., Malhotra, A., Marsh, J., Nagy, M., Walsh, N.: XQuery 1.0 and XPath 2.0 data model (2006)Google Scholar
  18. 18.
    Wadler, P.: Two semantics of xpath. Discussion note for W3C XSLT Working Group (1999),
  19. 19.
    Cooper, E., Lindley, S., Wadler, P., Yallop, J.: Links: Web programming without tiers (unpublished Manuscript) (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Giorgio Ghelli
    • 1
  • Kristoffer Rose
    • 2
  • Jérôme Siméon
    • 2
  1. 1.Dipartimento di InformaticaUniversità di PisaPisaItaly
  2. 2.IBM T.J. Watson Research CenterYorktown HeightsU.S.A.

Personalised recommendations