W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2000

Re: Querying reified statements

From: David Allsopp <dallsopp@signal.dera.gov.uk>
Date: Wed, 13 Dec 2000 16:09:33 +0000
Message-ID: <3A379F3D.6E484D4C@signal.dera.gov.uk>
CC: www-rdf-interest@w3.org


Geoff Chappell wrote:
> 
> I've been experimenting recently with a query language that takes queries of
> the form:
> 
>     select  ?age where {?x ?y {age JohnSmith ?age}}
> 
> which behind the scenes results in a query:
> 
>     select ?age where {?x ?y ?z} and {rdf:type ?z rdf:Statement} and
> {rdf:subject ?z JohnSmith}
>                 and {rdf:predicate ?z age} and {rdf:object ?z ?age}
> 
> Similarly, inner triples are assumed to refer to reified statements in
> insert, delete, infer, and other commands. Additional nesting of triples is
> allowed (i.e. he says she says such and such).  This seems to be a pretty
> natural representation and works well in practice.


That's a nice way of expressing it!  

However, I have problems with what the query should be mapped into.  For
example in the Stanford API, 
using the following example:

<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   
xmlns:DC="http://purl.org/metadata/dublin_core/"     
xmlns:DS="http://www.w3.org/Schemas/DS-Schema/"> 
<Description about="http://www.bar.com/some.doc" bagID="Statement_001">
  <DC:Creator>John Smith</DC:Creator>
</Description>
<Description about="#Statement_001">
  <DS:CreatedOn>1998-02-06T14:00Z</DS:CreatedOn>
  <DS:CreatedBy>Jane Cooper</DS:CreatedBy>
</Description>
</RDF>

the expanded query (looking for triples with the predicates rdf:type,
rdf:subject etc) wouldn't work as those triples don't exist (because in
the Stanford implementation Statement is a subclass of Resource and can
be referred to directly).

(please correct me if I'm wrong, Sergey Melnik!)

However, with the following example, with explicit reification, such a
query would work (and a query looking for the reified statement directly
would not work).

<?xml version="1.0"?>
<RDF xmlns:DC='http://purl.org/metadata/dublin_core#'   
xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Description ID="example">
  <subject resource="http://www.foo.com/bar.html" />
  <predicate resource="http://purl.org/metadata/dublin_core#author" />
  <object>Janne Saarela</object>
  <type
resource="http://w3.org/TR/1999/PR-rdf-syntax-19990105#Statement" />
</Description>
</RDF>

Will a query engine have to perform both kinds of query on the model?
That doesn't seem very satisfactory!

Regards,

David Allsopp

-- 
Dr David Allsopp
DERA Malvern
Received on Wednesday, 13 December 2000 11:10:56 GMT

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