Rewriting XPath Queries Using Materialized Views

As a simple XML query language but with enough expressive power, XPath has become very popular. To expedite evaluation of XPath queries, we consider the problem of rewriting XPath queries using materialized XPath views. This problem is very important and arises not only from query optimization in server side but also from semantic caching in client side. We consider the problem of deciding whether there exists a rewriting of a query using XPath views and the problem of finding minimal rewritings. We first consider those two problems for a very practical XPath fragment containing the descendent, child, wildcard and branch features. We show that the rewriting existence problem is coNP-hard and the problem of finding minimal rewritings is Σp3. We also consider those two rewriting problems for three subclasses of this XPath fragment, each of which contains child feature and two of descendent, wildcard and branch features, and show that both rewriting problems can be polynomially solved. Finally, we give an algorithm for finding minimal rewritings, which is sound for the XPath fragment, but is also complete and runs in polynomial time for its three subclasses.

[1]  Yannis Papakonstantinou,et al.  Query rewriting for semistructured data , 1999, SIGMOD '99.

[2]  Georg Gottlob,et al.  Conjunctive queries over trees , 2004, JACM.

[3]  Dan Suciu,et al.  Containment and equivalence for an XPath fragment , 2002, PODS.

[4]  Hamid Pirahesh,et al.  A Framework for Using Materialized XPath Views in XML Query Processing , 2004, VLDB.

[5]  Laks V. S. Lakshmanan,et al.  Minimization of tree pattern queries , 2001, SIGMOD '01.

[6]  Scott Boag,et al.  XQuery 1.0 : An XML Query Language , 2007 .

[7]  Thomas Schwentick,et al.  XPath Containment in the Presence of Disjunction, DTDs, and Variables , 2003, ICDT.

[8]  Jignesh M. Patel,et al.  Structural joins: a primitive for efficient XML query pattern matching , 2002, Proceedings 18th International Conference on Data Engineering.

[9]  Georg Gottlob,et al.  XPath query evaluation: improving time and space efficiency , 2003, Proceedings 19th International Conference on Data Engineering (Cat. No.03CH37405).

[10]  Prakash V. Ramanan,et al.  Efficient algorithms for minimizing tree pattern queries , 2002, SIGMOD '02.

[11]  Steven J. DeRose,et al.  XML Path Language (XPath) , 1999 .

[12]  Alin Deutsch,et al.  Containment and Integrity Constraints for XPath , 2001, KRDB.

[13]  Alex Thomo,et al.  Query containment and rewriting using views for regular path queries under constraints , 2003, PODS.

[14]  Gabriel M. Kuper,et al.  Structural properties of XPath fragments , 2003, Theor. Comput. Sci..

[15]  Philip S. Yu,et al.  ViST: a dynamic index method for querying XML data by tree structures , 2003, SIGMOD '03.

[16]  Divesh Srivastava,et al.  Holistic twig joins: optimal XML pattern matching , 2002, SIGMOD '02.

[17]  Divesh Srivastava,et al.  Answering Queries Using Views. , 1999, PODS 1995.

[18]  Georg Gottlob,et al.  The complexity of XPath query evaluation , 2003, PODS.

[19]  Dan Suciu,et al.  Index Structures for Path Expressions , 1999, ICDT.

[20]  Alin Deutsch,et al.  Reformulation of XML Queries and Constraints , 2003, ICDT.

[21]  Divesh Srivastava,et al.  Answering Queries Using Views. , 1999, PODS 1995.

[22]  Peter T. Wood,et al.  Containment for XPath Fragments under DTD Constraints , 2003, ICDT.

[23]  Laks V. S. Lakshmanan,et al.  On Testing Satisfiability of Tree Pattern Queries , 2004, VLDB.

[24]  Dan Suciu,et al.  Containment and equivalence for a fragment of XPath , 2004, JACM.

[25]  Yannis Papakonstantinou,et al.  Query Rewriting using Semistructured Views , 1999 .

[26]  Peter T. Wood Minimising Simple XPath Expressions , 2001, WebDB.

[27]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[28]  Mong-Li Lee,et al.  Efficient Mining of XML Query Patterns for Caching , 2003, VLDB.

[29]  Susan B. Davidson,et al.  BLAS: an efficient XPath processing system , 2004, SIGMOD '04.

[30]  Alon Y. Halevy,et al.  Answering queries using views: A survey , 2001, The VLDB Journal.

[31]  Diego Calvanese,et al.  Answering regular path queries using views , 2000, Proceedings of 16th International Conference on Data Engineering (Cat. No.00CB37073).