Re: Query and storage

> Rather, I was thinking about the efficiency of higher-level query
> constructs;  my own implementation is modelled on the idea of matching
> tree-shaped query subgraphs against an arbitrary RDF graph.  My intuition
> here is that this should permit more efficient handling of the
> query.  

Interesting. That is exactly what we do in the query-by-example system that we
use in our personal info man work. Exploiting the restriction to tree structured
queries does seem to give us good performance. We use this for extracting
subgraphs (union of all places the tree matches) rather that sets of variable
bindings.

To refer to the example in Andy's other recent message:

> (?x, <person:firstName>, "John")
>  (?x, <person:lastName>, "Doe")
>  (?x, <person:age>, ?age) [ ?age > 50 ]
>  (?x, <person:spouse>, <person:firstName>, "Jane")
>  (?x, <<person:*>>, ?z)

We would (partially) express that in our current system in an N3-lite syntax as:
  [] person:firstname "John"; 
     person:lastName "Doe"; 
     person:spouse [person:firstName "Jane"];
     person:* [].

[Note the omission of the age clause, we don't yet support inline constraint
clauses in query-by-example.]

Dave

Received on Thursday, 23 May 2002 13:01:09 UTC