W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2001

Re: XQuery vs XML Query Algebra

From: Michael Dyck <MichaelDyck@home.com>
Date: Sat, 03 Mar 2001 11:04:47 -0800
Message-ID: <3AA1404F.FBF7EFA6@home.com>
To: Peter Fankhauser <fankhaus@darmstadt.gmd.de>
CC: www-ql@w3.org
Peter Fankhauser wrote:
> 
> > So that got me wondering: if we have the Algebra, why do we need
> > XQuery?
> 
> The algebra and XQuery tackle the design space from different angles.

Then I guess I'm thinking:
   maybe they shouldn't; or
   maybe they don't need to; or
   maybe there's a hyperplane through the design space that contains both
angles :)
 
> The main goal of the algebra working draft is to provide a
> formal framework for specifying the dynamic and static
> (type) semantics of the query language(s).
> ...
> Some of the additional goals of XQuery are
> (see http://www.w3.org/TR/xquery/#section-Introduction) are
> conciseness and understandibility, and human readability, even
> for rather complex queries.

Okay, so the main goal of the Algebra is straightforward formalizability,
whereas XQuery has a goal of conciseness/readability.  But I'm not convinced
that these goals are mutually exclusive. In fact, it seems to me that (to a
large extent) the Algebra and XQuery are *both* straightforwardly
formalizable, and *both* concise & readable.  So rather than develop them as
separate languages (with the duplication of effort and the synchronization
problems), wouldn't it be less work overall to "merge" them?

Granted, there are cases where an XQuery operation is more concise &
readable than its Algebra-equivalent. So in merging the two languages, one
would face the question: "Do we add this operator to the language
(sacrificing formal simplicity for readability), or leave it out
(sacrificing readability for formal simplicity)?" But I think the Algebra
has already dealt with this problem, by supplying "reducible expressions",
which are defined by equivalence to expressions using lower-level operators
from the "core" Algebra. (http://www.w3.org/TR/query-algebra/#sec_equivlaws)
Thus, the Algebra achieves both readability (allowing you to use the nice
operators) and formalizability (defining them by straightforward
transformation, without increasing the set of core operators).

-Michael Dyck
Received on Saturday, 3 March 2001 14:08:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:17 GMT