||XQuery is a functional query language for XML.
We propose a relative XQuery cost model that is able to estimate the
performance gain during source level transformation.
This research facilitates the evaluation of various rewriting techniques without
introducing real engines.
The cost model consists of simple recursive functions based on
functional language constructs. They are determined using formal
semantics and other known efficient algorithms.
Analytic comparison of costs between expressions before and after
transformation is possible in an engine-independent manner.
The relativity of the model allows uninterpreted components within,
which do not affect the mathematical proof of the comparison.
Moreover, it can be tailored to reflect engine specific evaluation
strategies such as the order of evaluation of operands.