Re: A Comparison of RDF Query Languages

This is an useful comparison but one query language missing is RxPath 
( -- so below are RxPath queries 
for each of your use cases.

RxPath is syntatically identical to XPath 1.0 and is defined by a 
deterministic mapping from the RDF model to XPath data model. Its 
specification is available at 
(BTW, I'll be releasing a new version of the software next week.)

Based on the metric described in the conclusion of your paper, it's more 
complete than any of the languages surveyed, supporting 12 out of the 14 
use cases. Also, the same mapping (with minor changes) could be applied 
to map RDF models to the XPath 2.0/XQuery data model, the resulting 
query language would address most of the items on your wishlist, 
including aggregation, sorting, and full support for XML Schema datatypes.

-- adam

1. Path Expression
Return the names of the authors of publication X.


2 Optional Path
Return the name and, if known, the e-mail of the author of publication X.

/*[.='X']/author/*/rdf:li/*/name | /*[.='X']/author/*/rdf:li/*/email

(Note: RxPath doesn't support tuples, but each email will follow each 
author's name because the union is returned in "document" order.)

3 union
Return the labels of all topics that and (union) the titles of all 

/*/rdfs:label | /*/rdfs:title

4 difference
Return the labels of all topics that are not titles of publications.

/*/rdfs:label[. != /*/rdfs:title]

5 Quantification
Return the persons who are authors of all publications.

Not Supported.

6 Aggregation
Count the number of authors of a publication.


7 Recursion
Return all subtopics of topic "Information Systems", recursively.


8 Reification
Return the person who has classified the publication X.

/*[. =/*[.='X']/isAbout/@rdf:ID]/dc:creator/*

9 Collections and Containers
Return the first author of Publication X.


Unlike the languages you surveyed, RxPath has syntatic support
for RDF containers and collections so you can get the last author too:


10 Namespace
Return all resources whose namespace starts with 

Assuming there's a namespace declaration with the prefix 'aifb':


or for any arbitrary URI prefix:

/*[starts-with(., "")]

11 Language
Return the German label of the topic whose English label is "Database 

/*[rdfs:label = 'Database Management']/rdfs:label[@xml:lang='de']

12 Lexical Space
Return all publications where the page number is the lexical value '08'.

/Publication[pages = '08']

13 Value Space
Return all publications where the page number is the integer value 8.

/Publication[pages = 8]

Note: In XPath 1.0 type coercion is automatic but it only supports 
numbers and strings.

14 Entailment
Return all instances of that are members of the class Publication.


(No special support for entailed vs. ground assertions, inference is up 
to the implementation.)

Andreas Eberhart wrote:

>Related to the recent work of the RDF Data Access Working Group [1], we have
>compared six proposals for RDF query languages. The report, the use case
>data, and the queries are available online [2].
>Looking forward to hearing your feedback.
>Peter Haase, Andreas Eberhart, Raphael Volz, Institute AIFB, University of
>Jeen Broekstra, Vrije Universiteit Amsterdam

Received on Wednesday, 28 April 2004 16:46:53 UTC