[redland] Query language support in Redland

Dan Brickley danbri at w3.org
Wed May 22 22:25:11 BST 2002


On Wed, 22 May 2002, Dave Beckett wrote:

> Just a quick note to say I've started added the infrastructure for
> this to Redland and now have a working dumb triples-matching query
> language coded, to test it out.

Sounds interesting. Got a pointer? can't see anything obvious in
http://cvs.ilrt.org/cvsweb/redland/librdf/

what's a 'triples-matching' query language?

> I can't promise that it'll get a real QL any time soon, since that
> will be a lot slower to code - mostly to in converting the existing
> QLs from Java and debugging.

Yeah, doing it in C sounds like a pain. You might be able to grab the
rdfdb-squish parser from
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/rdfdb/src/rdfdb/query/queryParser.c?rev=1.2
as a starting point.

BTW what do you mean 'converting the QLs from Java'? transliterating one
of the existing query engines? or just the query parsing code? The QLs
themselves aren't Java-centric, only their implementations.

I have a Ruby RDF query engine in progress that (thanks to your Ruby
binding :) should be able to talk to Redland. It won't be as efficient as
a C implementation, but is easier to tweak and prototype, and might be
good for testing against.

				Plus I have to pick one (1) to work on
> from RDFDB QL, Squish QL, RQL, RDQL, Versa, etc. etc.

These fall into classes: those that are basically a 'graph with labelled
missing bits', and those that aren't. The former are all based directly or
indirectly on the RDFdb QL and the old 'enabling inference' paper, and can
be authored graphically in RDFAuthor. There are some bells and whistles in
Squish and RDQL (<, > etc), but the basic approach is the same.

This is nice, as it means that a query implementation can remain agnostic
about the textual representation of queries.

To get running quickly with an implementation you could try using the
'query by example' approach, using a normal RDF graph (for which you have
a parser already), and decorating bits of the graph with variable names.
I have a sketch of this at
http://lists.w3.org/Archives/Public/www-archive/2002Apr/0040.html
or I think there was a WWW2002 paper (edutella?) that advocated basically
the same approach. I'm thinking to use this model for an rdf query test
suite, btw. Beats writing parsers for fiddly textual query languages.
Main flaw is that it doesn't allow easily for variables over properties.

Anyway, nice to see Redland evolving query capabilities :)

Dan


-- 
mailto:danbri at w3.org
http://www.w3.org/People/DanBri/







More information about the redland-dev mailing list