Re: RDF query, XQuery/XPath at XML 2003

I have recently heard several people say I was quoted on this topic, saying 
things I don't believe. I think it's time to post an email ;->

Here's what I currently think:

1. Until we have a good set of use cases for RDF query that we understand 
and agree on, along the lines of the XQuery Use Cases document, I doubt 
that we have an adequate understanding of what problem we are trying to 
solve. The data model for RDF is already quite clear - and quite simple. 
Once you have a data model and a set of use cases, I think we can discuss 
this intelligently.

2. The Syntactic Web paper [1] doesn't say what many people think it says. 
The summary on querying RDF with XQuery from "The Syntactic Web" still 
seems accurate to me. I have enclosed some quotes from this paper below my 
signature.

3. There should be one web. RDF and XML should be easily used together. Our 
use cases should focus on this.

4. For XQuery, the easiest way to provide RDF functionality may well be a 
function library along the lines suggested in "The Syntactic Web". Such a 
function library could be implemented in any language as an external 
library that could be called from XQuery.

But all of this is premature until we have use cases telling us what 
problem we are trying to solve!


Jonathan

"Syntax is not the opposite of semantics, it is a medium for semantics."

[1] http://www.w3.org/XML/2002/08/robie.syntacticweb.html


Summary: Querying RDF with XQuery

In the above queries, we have shown that an XML query language can
query RDF much more conveniently if the RDF is represented using
merged descriptions, which pre-compute joins that would otherwise need
to be performed at run-time. We have also shown that an RDF function
library can exploit the RDF schema if the assertions of the schema are
also present in the merged descriptions. In this paper, we have
written only a few functions, and a more complete function library
would be extremely helpful. However, we believe that we have
demonstrated representative and practical queries, showing that
querying RDF with an XQuery library is not only possible, but
reasonably straightforward. We need greater coverage before our
results should be considered conclusive.

Although we are able to perform sophisticated queries, our RDF library
is not type-safe with respect to RDF. For instance, it is helpful to
compare the rdf:predicate-range() function to the following RQL query:

bag(range(Artist)) Union subclassof(Artifact)

RQL returns a type error for this query, since the range function is
defined on properties and not classes. Our rdf:predicate-range()
function, if called using Artist as predicate-name, returns an empty
result without signaling an error. The final query result is the
evaluation of the second subquery (assuming that an appropriate XQuery
function is defined). Type safety may be an important reason for
native RDF query languages. Some of the loss of type information in
our current implementation is gratuitous, and could be corrected in a
future design. For instance, our merged representation could be
changed to include more type information, perhaps using an XML Schema,
and we should consider how much type information can be preserved by
the operations in our type library. However, there are limits to the
amount of type safety we can provide. For those who are interested in
data integration, this disadvantage is offset by the clear advantage
of being able to integrate information from RDF with topic maps and
XML, and is an inherent tradeoff when working across models.

Received on Wednesday, 21 January 2004 18:06:39 UTC