Versatile Web Query Languages: Principles, Exemplars, and Related Issues

Ranked #100,749 in Computers & Electronics, #1,557,723 overall

In the article "Querying the Web Reconsidered: Design Principles for Versatile Web Query Languages" (in the following referred to as Design Principles article) by Francois Bry, Tim Furche, Liviu Badea, Christoph Koch, Sebastian Schaffert, and Sacha Berger a number of design principles for Web query languages are discussed, in particular for Web query languages that cover not only one of the common Web representation formats such as XML, but several ones. This page presents several collections of links to related material.

Overview of the Design Principles

The following is a brief overview of the core design principles described in the article mentioned above.
  1. Versatility: Data, Syntax, and Interface. This principle asks for (a) a single language to access both Web and Semantic Web data; for (b) a consistent data model for Web data as graphs; for (c) consistent but versatile concrete syntaxes (XML maschine-processable, compact expert-readable, and visual user-readable).
  2. Data Selection: Pattern-based, Incomplete. This principle asks for (a) queries as patterns for data to minimize the inevitable differences between data and queries; for (b) incomplete queries and incomplete selection; and for expressive yet (at least in common cases) efficient patterns realized through a (c) polynomial language core.
  3. Answers: Arbitrary XML, Ranked. Both structure and order of answer structure should be programmable.
  4. Query Programs: Declarative, Rule-based. Query programs should be declarative, e.g., referentially transparent, side-effect free, and (answer) closed. Also support for rules is asked for as a powerful and flexible mechanism to realize views. Finally, it is argued that a separation of construction and querying is a desirable feature of a Web query language.
  5. Reasoning Capabilites. To handle data from different sources and to mediate data access using ontologies, reasoning capabilities are called for in Web query languages. Also, domain specific reasoning, e.g., for location or temporal reasoning is often useful in a query context.
  6. Querying and Evolution. There is a close connection between querying and evolution, i.e., reactive systems that handle state changes (such as database updates).

Principles, Requirements, and Use Cases for Web Query Languages

The following group of links are documents desribing principles, requirements, and/or use cases for Web query languages. Most are focused either on XML, RDF, or Topic Maps query languages. The group starts with a number of older documents that have influenced the development of XML query languages such as XQuery. It continues with several W3C documents on requirements and use cases for XQuery. It concludes with requirements for RDF and Topic Maps query languages from W3C or ISO.
Database Desiderata for an XML Query Language
In this influential article at the 1998 W3C Workshop on XML Query Languages, that initiated the development of an W3C XML Query recommendation, David Maier proposes both a set of requirements and of basic query operations that are essential for an XML query language.
Requirements and Desiderata for an XML Query Language
At the same workshop as the previously linked article, Frank Olken and John McCarthy proposed another, more abstract set of requirements for an XML query language. Notice the third requirement: "query language for both XML and RDF" related to the principle of versatility discussed in the Design Principles article.
Requirements for XML Document Database Systems
The linked ACM DocEng article authored by Airi Salminen and Frank Wm. Tompa discusses in-depth requirements for both XML query languages and database systems from a perspective of document management and retrieval. It focuses particularly on document fidelity and transformations.
XML Query (XQuery) Requirements
A W3C Working Draft defines the "official" requirements for the development of XQuery. Most of the requirements cover detailed language features and some are tailored to the specificities of XQuery. The document also shows to what extend each of the requirements has been addressed in the current Candidate Recommendation of XQuery and discusses deviations.
XML Query Use Cases
The requirements working draft is accompanied by a separate and far more detailed use case document linked here. This working draft defines 9 scenarios for XML querying each accompanied by a set of queries in natural language. For each query, a realization in XQuery is given. For comparison also refer to this realisation in Xcerpt, cf. REWERSE Deliverable I4-D3.
Influences on the Design of XQuery
Excerpt from the below linked book "XQuery from the Experts" that sheds some lights on the (informal) principles that guided the development of XQuery. The most notable principles mentioned are
(1) Compositionality, i.e., the language property that expressions have a uniform domain and range and can thus be arbitrarily composed. In XQuery that domain and range is a sequence of nodes or atomic items. As noted in the linked text, compositionality is useful only if the expressions are side-effect free, a property that XQuery mostly achieves but fails at in some cases, cf. Daniela Florescu, co-editor of XQuery, on the XML.DEV mailinglist about side-effects and context sensitive (i.e., not referentially transparent) expressions in XQuery.
(2) Closure, i.e., the language property that input and ouput domain of queries is the same. This is the "weak" form of answer closedness described in the Design Principles article.
(3) Compatibility with several W3C recommendations, most notably XML Schema and XPath.
(4) XQuery's expressions are design to be concise to write rather than obvious to read as evidenced by numerous "implicit" operations.
RDF Data Access Use Cases and Requirements
Guiding the development of the W3C RDF query language and access protocol (SPARQL) these use cases and requirements are tailored to the intended use of SPARQL as low-level data access protocol. Nevertheless, some of the use cases explicitly refer to the need to further process the queried RDF data with XML tools. However, separate languages are suggested. This approach to post-processing the results of the RDF query is further illustrated in the SPARQL Query Results XML Format.
Topic Map Query Language (TMQL), Requirements and Use Cases
A standardized query language for Topic Maps (TMQL) is currently under investigation at ISO/IEC. An early draft, as well as requirements and use cases can be found at the ISO's Topic Maps homepage linked here. The requirements document is similar in style and spirit to the one for XML linked above.

Surveys and Comparisons of Web Query Languages

XML Query Languages: Experiences and Exemplars
A comparison of the state of the art in XML query languages as of 1999. Along ten queries, Lorel, XML-QL, YaTL, and XQL are compared. Though out-dated from the point of the considered languages, most of the issues raised in the comparison are still valid.

Date of Publication: 1999.
Comparative Analysis of five XML Query Languages
The linked paper presents a close look at LOREL, XML-QL, XML-GL, XSL, and XQL. Again, this overview is somewhat out-of-date, but still provides valuable insights through an interesting selection of features that are used to evaluate and classify the considered query languages.

Date of Publication: 2000.
RDF Query Languages: A State-of-the-Art
A short comparison focusing on two styles of RDF query languages and their exemplars: SQL-style languages influenced from database community versus rule-based languages influenced from AI and knowledge management community.

Date of Publication: 1999
RDF Query Languages: Use Cases and Examples
A collection of (rather informal) use cases for RDF query languages together with realization of these use cases in a broad collection of RDF languages, often contributed by the authors of the languages. Provides a very practical, but also rather unorganized and, at times, unfocused overview of current RDF query languages.

Last updated: June 2004.
A Comparison of RDF Query Languages
Link to a collection of information, including a recent ISWC article by Peter Haase, Jeen Broekstra, Andreas Eberhart, and Raphael Volz, that compares a limited but rather representative number of RDF query languages along 14 queries that test for certain language features. Includes links to actual implementations of the queries where the compared languages support the query.

Date of Publication: 2004.
Web and Semantic Web Query Languages: A Survey
Chapter in the LNCS Tutorial volume "Reasoning Web" that presents a detailed survey of current Web and Semantic Web query languages authored by among others by authors of the Design Principles article.

Date of Publication: 2005.
Web and Semantic Web Query Languages: Standards, State of the Art, and Perspectives
Course material for the 2005 Reasoning Web summer school course on "Web and Semantic Web Query Languages: Standards, State of the Art, and Perspectives". The linked site provides information about the course as well as access to the course material. In particular, the extensive survey of XML, RDF, Topic Maps, and OWL query languages that formes the basis of the course is accessible from the linked site.

Date of Publication: 2005.

Exemplars of Web Query Languages

Small Collection of Web Query Languages and their Design Principles

The following collection of links provides pointers to Web query languages that exemplify some of the design principles described in the article "Querying the Web Reconsidered: Design Principles for Versatile Web Query Languages". For each link, a short description of the relation to the principles from the article is given.
Xcerpt @ xcerpt.org
Xcerpt is a query language developed by some of the authors of "Querying the Web Reconsidered". In the spirit of the 'versatility' principle, it aims at an intertwined access to different forms of Web data, in particular to RDF and XML. Xcerpt queries are expressed using patterns for XML data like in the query-by-example paradigm and rules like in logic programming. Xcerpt also adds a number of novel constructs to pattern based XML query languages, e.g., optional query parts and expressive, yet declarative grouping constructs.

The linked Web site hosts current prototypes of the Xcerpt language as well as a draft documentation.
Xcerpt @ REWERSE "Reasoning-aware Querying" Working Group
Xcerpt's home at the REWERSE Working Group on "Reasoning aware Querying". REWERSE is a Network of Excellence funded mostly by the European Union. It is focused on rule languages and reasoning for the (Semantic) Web.
Quilt @ IBM Almaden
Quilt is a close predecessor of XQuery that introduced many of the syntactical constructs later adopted into the XQuery standard (e.g., the FLWR expression). Though interesting for historical reasons, implementations of Quilt are not available.
XQuery @ W3C
The XQuery homepage at the World Wide Web Consortium (W3C) is a good entry point for information on XQuery. XQuery is the soon-to-be W3C recommendation for querying XML data. It is characterized by (1) the use of XPath navigation for data access, (2) the use of FLWOR expressions, a form of iterations, to iterate over the result of query expressions, and (3) a mix of construction and querying allowing for compact, but at times confusing queries.

The W3C homepage provides links to all specifications related to XQuery, as well as lists of implementations, books, tutorials, etc. that cover XQuery.
XML-QL @ W3C
This W3C note (i.e., a member submission without endorsement by the W3C) describes XML-QL, a query language that uses, like Xcerpt, patterns for accessing XML data, but mixes, like XQuery, construction and querying. In particular, grouping (which is common place in XML queries as structural grouping) is expressed using sub-queries. XML-QL does not provide views, rules, or similar mechanisms.
SPARQL @ xml.com
Serving both as a gentle introduction and beginner's tutorial for SPARQL, the xml.com article Introducing Querying the Semantic Web focuses on key concepts and basic queries, as well as how SPARQL came to be.
Versa @ xml.com
The linked article introduces into Versa, a path-oriented RDF query language in the spirit of XPath. Versa is an RDF query language that uses explicit navigation (as in XPath, XQuery, etc.) to access data rather than triple formula as SPARQL or graph patterns as Xcerpt.
XSL(T) @ W3C
XSLT is a language conceived primarily for document transformation rather than querying. However, in particular in its latest incarnation XSLT 2.0 the differences to query languages such as XQuery or Xcerpt become increasingly unclear. Maybe the most distinguishing feature of XSLT is its default structural recursion over the input document, that makes transformations where the structure of the result document resembles the structure of (parts of) the input document very natural.

The linked Web site provides more information surrounding XSLT as well as related languages such as XPath and XSL-FO.
RQL @ ICS-FORTH
The RQL homepage at the Institute for Computer Science of the Foundation for Research and Technology, Hellas (FORTH) presents a short overview as well as links to publications, implementations for RQL, the RDF Query Language. RQL takes a functional approach to querying RDF. It combines triple patterns (as now used in SPARQL) with path expressions as in OQL. Furthermore, it is one of the few RDF query languages that pays close attention to issues of typing.

Related Books (from Amazon)

The following books provide either an in-depth look into particular Web query languages (mostly mainstream languages) or a collection of articles related to versatile Web querying.
Loading

Recent W3C Announcements

Loading Fetching RSS feed... please stand by

Recent News related to Web Querying

(retrieved every half hour from Google News)

Loading Fetching RSS feed... please stand by

by

timfu

Tim Furche holds a masters degree in Computer Science from the University of Munich, Germany (2002). He is currently employed as a research assistant... more »

Feeling creative? Create a Lens!