XPath Rewriting Using Multiple Views: Achieving Completeness and Efficiency
Bogdan Cautis, Alin Deutsch · 2008
The standard approach for optimization of XPath queries by rewriting using views techniques consists in navigating inside a view’s output, thus allowing the usage of only one view in the rewritten query. Algorithms for richer classes of XPath rewritings, using intersection or joins on node identifiers, have been proposed, but they either lack completeness guarantees, or require additional information about the data. We identify the tightest restrictions under which an XPath can be rewritten in polynomial time using an intersection of views and propose an algorithm that works for any documents or type of identifiers. As an additional contribution, we analyze the complexity of the related problem of deciding if an XPath with intersection can be equivalently rewritten as one without intersection or union.