XML Query Algebra - Does it Add Up?
December 11, 2000
On December 4, 2000 the XML
Query Working Group published its latest specification, XML Query Algebra, which
will be the basis of the query language. It borrows heavily from
XPath and SQL. Earlier documents include the XML Query Requirements and XML Query Data Model,
both from mid 2000. All three documents are still Working Drafts,
which means you can expect numerous changes downstream. The XML Query
Data Model and the XML Query Algebra together will define the exact
semantics of what will be called the XML Query Language, which
is yet to be published (naturally).
Take a look at the first example
(of many) from the Algebra Working Draft. Although it may be elegant
to a mathematician, it is something of a beast to web developers. The
excerpt below is from the Iteration
section; the query iterates over all books and extracts the
author and title. The first two lines denote the actual query and the
remainder indicates the format of the result. Clearly, much of this
needs to be worked into future tools to make it useful, but I imagine
that is the intent of the Working Group.
for b in bib0/book do
book [ b/author, b/title ]
==> book [
author [ "Abiteboul" ],
author [ "Buneman" ],
author [ "Suciu" ],
title [ "Data on the Web" ]
],
book [
author [ "Fernandez" ],
author [ "Suciu" ],
title [ "XML Query" ]
]
: book [
author[ String ]{1, *},
title[ String ]
]{0, *}
In the XML Query
Algebra Working Draft, the authors give homage to their
influences:
"This work builds on long standing traditions in the
database community. In particular, we have been inspired by systems
such as SQL, OQL, and nested relational algebra (NRA). We have also
been inspired by systems such as Quilt, UnQL, XDuce, XML-QL, XPath,
XQL, and YaTL."
As some of you may recall, the original query language work dates
back to December 1998 from QL'98 - The Query Languages
Workshop which drew 66 different proposals. Interested readers
may wish to refer to the Query
Languages piece published on WDVL from XML99 a year ago.
XSLT: Style Free Style Sheets
What Happened at XML 2000?
Yuri - The Video
|