Start Your Query Engines

A visit to googlefight suggests that the XQuery meme outcompetes the SPARQL [?] meme in the parts of the universe Google knows about1 at a rate upwards of 4:1. XQuery has clearly been the go-to standard for vendors of relational database engines that have recently added XML capabilities to their offerings. If your data has the structure, then it’s not a bad choice at all. For example, having put together course packs from numerous scattered journal articles, I can really appreciate the power of something like SafariU, which is built with XQuery.

Reading over the accounts of XML 2006 sessions, I was kind of puzzled by the choice of XQuery as the underpinnings of a mashup that combines no less than three web-based data sources (Project Gutenberg, CIA World Factbook, and Wikipedia). Given the use of OWL, and the metadata-oriented nature of the queries, I would have thought SPARQL was a natural fit for the project (update: Ronald P. Reck replies in comments: XQuery was chosen because it’s a more mature standard; he also provides handy links to the full proceedings and other papers).
The fact is, while they’re both query languages, as Bob DuCharme points out, SPARQL and XQuery aren’t designed to solve the same problems. It’s really worth reading his post if you’ve encountered SPARQL but don’t yet see the point of it (or this RDF business).

1 Stealing a phrase from the younger Wittgenstein: the limits of my search index indicate the limits of my world.

This entry was posted in RDF. Bookmark the permalink.

One Response to Start Your Query Engines

  1. Ronald P. Reck says:

    There is a straight-forward reason why we chose to use XQuery rather than SPARQL. SPARQL is currently a W3C “Working Draft” and the abstract for the Dec. 2006 conference was submitted in June 2006 when SPARQL was even less mature than it is now. In contrast, XQuery was a “Candidate Recommendation” when we started and is now a “Proposed Recommendation”, likely to become a full Recommendation in January or February.

    Our contention is that it is far more practical to focus on the more mature technology for a time-limited pilot. One would hope that US taxpayers appreciate when contractors aren’t consuming taxpayer dollars on technology that — by W3C definition — “is likely to change”.

    (Reference: http://www.w3.org/TR/#About and http://www.w3.org/2005/10/Process-20051014/tr#maturity-levels.)

    Also, please note that on page 26 of our published paper (*), we specifically mention SPARQL in the context of “Future Work Potentials”, assuming it progresses along the W3C Recommendation Track.

    (*) See
    http://2006.xmlconference.org/proceedings/57/presentation.pdf
    http://iama.rrecktek.com/xml2006/XML2006-XQuery-paper-Sall-Reck-ID57.pdf
    or
    http://kensall.com/xmlconf/xml2006-Sall-Reck-XQuery-OWL-Factbook-Wikipedia-PG-paper.pdf

Leave a Reply