W3C has acknowledged receipt of a member submission RDQL: A Query Language for RDF from Hewlett-Packard. RDQL has already "been implemented in a number of RDF systems for extracting information from RDF graphs." RDQL represents an evolution from several languages, including ideas described in a 1998 W3C Query Languages meeting paper Enabling Inference, by R.V. Guha, Ora Lassila, Eric Miller, and Dan Brickley. RDQL is "an implementation of an SQL-like query language for RDF. It treats RDF as data and provides query with triple patterns and constraints over a single RDF model. The target usage is for scripting and for experimentation in information modelling languages. The language is derived from SquishQL. The purpose of RDQL is as a model-level access mechanism that is higher level than an RDF API. Query provides one way in which the programmer can write a more declarative statement of what is wanted, and have the system retrieve it." According to the W3C Staff Comment on the submission, the RDQL approach "suggests a strategy for possible standardization: an RDQL-like language could be developed and deployed without detailed treatment of rule or inference facilities, yet subsequently be used to query "smarter" RDF services which make use of inferences licensed by OWL or RDF-rule semantics."
Bibliographic Information
RDQL: A Query Language for RDF. W3C Member Submission 9-January-2004. By Andy Seaborne (HP Labs Bristol). Submitted by Jim Bell (Hewlett-Packard) October 29, 2003. Version URL: http://www.w3.org/Submission/2004/SUBM-RDQL-20040109/. Latest version URL: http://www.w3.org/Submission/RDQL/.
RDQL Overview
An RDF model is graph, often expressed as a set of triples. An RDQL consists of a graph pattern, expressed as a list of triple patterns. Each triple pattern is comprised of named variables and RDF values (URIs and literals). An RDQL query can additionally have a set of constraints on the values of those variables, and a list of the variables required in the answer set...
An RDQL query treats an RDF graph purely as data. If the implementation of that graph provides inferencing to appear as 'virtual triples' (i.e., triples that appear in the graph but are not in the ground facts) then an RDQL will include those triples as possible matches in triple patterns. RDQL makes no distinction between inferred triples and ground triples...
The example query [presented in the Note has] just one triple pattern forming a single edge in the graph pattern. More complicated graph patterns are made by writing all the edges in the query. Like RDF, these are interpreted conjunctively -- all of them must match for a result to be added to the result set of the query. This may mean that variables are used to link together triple patterns...
Grammar: The grammar [presented in the Note] is derived from the Jena implementation of RDQL... It is a permissive grammar. It is designed for convenience and includes liberal interpretations of terms from other systems..." [excerpted from the 9-January-2004 W3C submission]
From the W3C Staff Comment on RDQL
"The RDQL specification represents a concise summary of an approach to querying RDF that has been evolving since W3C first solicited RDF query proposals at the Query Languages 1998 (QL'98) Workshop.
RDQL presents a simple mechanism for querying RDF graphs, articulating an approach which has, in various forms, underpinned the majority of RDF query language proposals. Informal developer discussions are already underway within the RDF Interest Group's www-rdf-rules list to identify the points of variation and innovation between RDQL and other RDF query proposals such as Algae, Squish, RQL, RDFQ, etc. (see survey, and testing pages for details). The RDQL submission is particularly welcome in this context as it provides a 'strawman' target for discussion, testing, evaluation against use cases and consideration for possible standardization...
It is now over five years since W3C's QL'98 Workshop. While no formal W3C Working Group on RDF query was chartered during that period, pre-standardization work on RDF query mechanisms has proceeded through informal developer and industry discussions, in the RDF Interest Group and elsewhere. RDQL and related approaches have been maturing, and W3C is currently considering the charter and scope of a Working Group in this area. A draft charter was recently circulated amongst RDF query implementors for discussion.
Key considerations in this are the relationships between RDF query and W3C's existing work on XML Query (XQuery), on the Web Ontology Language (OWL), and possible future work on RDF-based rule languages. Discussion of the technical issues surrounding integration amongst these approaches is particularly welcome on the www-rdf-rules list where it will help set the context for any future standardization work on data-oriented RDF query languages such as RDQL. Information from application developers who have worked with RDQL-based query engines will be of particular use in understanding the design tradeoffs in this area.
The RDQL submission presents an approach for integrating simple RDF query with (for example) OWL and rule-aware systems, by noting that:
If the implementation of that graph provides inferencing to appear as 'virtual triples' (i.e. triples that appear in the graph but are not in the ground facts) then an RDQL will include those triples as possible matches in triple patterns. RDQL makes no distinction between inferred triples and ground triples.
This approach suggests a strategy for possible standardization: an RDQL-like language could be developed and deployed without detailed treatment of rule or inference facilities, yet subsequently be used to query 'smarter' RDF services which make use of inferences licensed by OWL or RDF-rule semantics.
RDQL as presented in this submission does not provide special-case support for querying of RDF containers and collections, for marking certain statements as 'optional', nor for querying the source or 'provenance' of RDF statements. The resulting simplicity of the specification adds to the appeal of RDQL as a mechanism for RDF query; however further discussion and evaluation is needed to determine the costs and benefits associated with these design tradeoffs.
The RDQL submission presents both a textual grammar for representing RDF queries, as well as a 'quick description of the key elements of the query language'. While the description gives a good general overview of this approach to RDF query, it does not itself constitute a full specification for an RDF query language. Experience with the RDF Core and Web Ontology specifications suggests that a more detailed elaboration (including formal semantics, test cases) is essential to ensuring reliable interoperability amongst independent implementations. HP's RDQL submission represents a valuable step towards such a specification, consolidating ideas that have been explored by RDF implementors and which could usefully be developed further if new work is chartered in this area..." [excerpted from the statement by Dan Brickley (RDF Core Co-Chair and RDF Interest Group Chair) and Eric Miller (W3C Semantic Web Activity Lead).]
Principal references:
- RDQL - A Query Language for RDF. W3C Member Submission.
- Hewlett-Packard's Submission request to W3C
- W3C Team Comment on the RDQL Submission. By Dan Brickley (RDF Core Co-Chair and RDF Interest Group Chair) and Eric Miller (W3C Semantic Web Activity Lead).
- Jena: A Semantic Web Framework for Java. "Jena is a Java framework for building Semantic Web applications. It provides a programmatic environment for RDF, RDFS and OWL, including a rule-based inference engine. Jena is open source and grown out of work with the HP Labs Semantic Web Programme. The Jena Framework includes: an RDF API, Reading and writing RDF in RDF/XML, N3 and N-Triples, an OWL API, in-memory and persistent storage, and RDQL (a query language for RDF)..."
- Test suite for the Jena implementation of RDQL
- Enabling Inferencing. By R.V. Guha, Ora Lassila, Eric Miller, and Dan Brickley. Presented as a position paper at the W3C Query Languages Meeting in Boston, MA, USA (December 3-4, 1998). "This paper presents an overview of the query services that might be built on top of XML/RDF data. It does not present a specific proposal for an RDF query language; instead, it argues for a query language that is expressed in terms of the RDF logical data model rather than one particular concrete syntax..."
- RDF Query Using SquishQL
- "Three Implementations of SquishQL, a Simple RDF Query Language." By Libby Miller, Andy Seaborne, and Alberto Reggiori. In Proceedings of the First International Semantic Web Conference on The Semantic Web (2002).
- Hewlett-Packard References:
- Contact: Andy Seaborne (HP)
- W3C Resource Description Framework (RDF) resources
- "Resource Description Framework (RDF)" - General references.