Rewriting XPath queries using materialized views

Wanhong Xu, Z. Meral Özsoyoğlu

2005 · 125 citations · 19 references

Concepts

TL;DR

XPath is a popular XML query language whose expressive power has made it widely used, and the problem of rewriting queries using materialized views is important for both server‑side optimization and client‑side semantic caching. The study aims to expedite XPath query evaluation by investigating whether a query can be rewritten using materialized XPath views and how to find minimal rewritings. The authors analyze the existence and minimal‑rewriting problems for a practical XPath fragment with descendant, child, wildcard, and branch features, then extend the analysis to three subclasses where both problems are polynomially solvable, and present a polynomial‑time algorithm that is sound for the full fragment and complete for the subclasses. The study finds that, in general, determining the existence of a rewriting is coNP‑hard and finding minimal rewritings is Σp3‑complete, but for three specific subclasses.

Abstract

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.

References

19