Re: Querying reified statements

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=""   
<Description about="" bagID="Statement_001">
  <DC:Creator>John Smith</DC:Creator>
<Description about="#Statement_001">
  <DS:CreatedBy>Jane Cooper</DS:CreatedBy>

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=''   
<Description ID="example">
  <subject resource="" />
  <predicate resource="" />
  <object>Janne Saarela</object>
resource="" />

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


David Allsopp

Dr David Allsopp
DERA Malvern

Received on Wednesday, 13 December 2000 11:10:56 UTC