[redland] Query language support in Redland

Dave Beckett dave.beckett at bristol.ac.uk
Sat May 25 00:33:01 BST 2002


>>>Dan Brickley said:
> 
> 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/

It is checked in now; but unstable as I'm tinkering with the api.

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

a dumb language like this:
  [http://example.org] "literal" -

where - is the wildcard field and the result is a sequence of
matching triples.  I'm deliberately making this different from other
formats, dumb and inflexible; for testing purposes.

> > 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.

Yes, but that is only mozilla licensed and not something I can
include directly in my LGPL/MPL software.

> 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.

yes to all of that; most of them are in Java and the implementation
might be the real place where the language is defined for some of
them?

> 
> 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.

The point is to have a native C query lang implementation so that all
the redland language apis can use it.
 
> 				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.

I'll think about this; I'm favouring the SQLy forms.

> Anyway, nice to see Redland evolving query capabilities :)

People seem to want a QL.

Also I've tentatively decided redland is 1.0 when it has a working QL

Dave






More information about the redland-dev mailing list