W3C home > Mailing lists > Public > www-rdf-logic@w3.org > April 2004

RE: A Comparison of RDF Query Languages

From: Stephane Fellah <fellah@pcigeomatics.com>
Date: Wed, 28 Apr 2004 16:56:30 -0400
Message-ID: <8ED21571324EB145933ACCD22B86AC3653C29E@bach.ncr.pcigeomatics.com>
To: "Adam Souzis" <adam-l@souzis.com>, "Andreas Eberhart" <aeb@aifb.uni-karlsruhe.de>
Cc: <daml-all@daml.org>, <ontoweb-list@www1-c703.uibk.ac.at>, <ontoweb-language-sig@cs.man.ac.uk>, <public-rdf-dawg@w3.org>, <semanticweb@yahoogroups.com>, <seweb-list@www1-c703.uibk.ac.at>, <www-webont-wg@w3.org>, <www-rdf-interest@w3.org>, <www-rdf-logic@w3.org>, <www-rdf-rules@w3.org>, "Raphael Volz" <raphael@volz.info>, <pha@aifb.uni-karlsruhe.de>, <jbroeks@cs.vu.nl>

Hi,

This is an interesting query language. Does it exist an implementation in Java (based on Jena for example) ?

Best regards
 
Stephane Fellah
Web Chief Architect
 
PCI Geomatics
490, Boulevard St Joseph
Hull, Quebec
Canada J8Y 3Y7
Tel: 1 819 770 0022 Ext. 223
Fax 1 819 770 0098
Visit our web site:  www.pcigeomatics.com
 


-----Original Message-----
From: Adam Souzis [mailto:adam-l@souzis.com] 
Sent: Wednesday, April 28, 2004 3:47 PM
To: Andreas Eberhart
Cc: daml-all@daml.org; ontoweb-list@www1-c703.uibk.ac.at; ontoweb-language-sig@cs.man.ac.uk; public-rdf-dawg@w3.org; semanticweb@yahoogroups.com; seweb-list@www1-c703.uibk.ac.at; www-webont-wg@w3.org; www-rdf-interest@w3.org; www-rdf-logic@w3.org; www-rdf-rules@w3.org; Raphael Volz; pha@aifb.uni-karlsruhe.de; jbroeks@cs.vu.nl
Subject: Re: A Comparison of RDF Query Languages


This is an useful comparison but one query language missing is RxPath 
(http://rx4rdf.liminalzone.org/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  http://rx4rdf.liminalzone.org/RxPathSpec 
(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.

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

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 
publications.

/*/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.

count(/*[.='X']/author/*/rdf:li/*)

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

/*[.='http://www.aifb.uni-karlsruhe.de/WBS/pha/rdf-query/sample.rdf#ACMTopic/Information_Systems']//acm:subTopic/*

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.

(/*[.='X']/author/*/rdf:li/*)[1]

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

(/*[.='X']/author/*/rdf:li/*)[last()]

10 Namespace
Return all resources whose namespace starts with 
"http://aifb.uni-karlsruhe.de/".

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

/aifb:*

or for any arbitrary URI prefix:

/*[starts-with(., "http://aifb.uni-karlsruhe.de/")]

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

/*[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.

/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
>Karlsruhe
>Jeen Broekstra, Vrije Universiteit Amsterdam
>
>
>[1] http://www.w3.org/2001/sw/DataAccess/
>[2] http://www.aifb.uni-karlsruhe.de/WBS/pha/rdf-query/
>
>  
>
Received on Wednesday, 28 April 2004 16:57:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:48 GMT