[redland-dev] Query Implementation Question
dave.beckett at bristol.ac.uk
Mon Nov 1 09:58:03 GMT 2004
On Sat, 30 Oct 2004 21:54:59 +0200, Jan Algermissen <jalgermissen at topicmapping.com> wrote:
> I have not found it in the RDQL or SPARQL specs so far, but I assume
> (hope) the query languages support some sort of string matching queries
> on literals (such as SQL's LIKE).
There are =~ and !~ operators in the sparql and rdql grammars
SPARQL's is at
but the majority of
has yet to be written; i.e. what it means.
SPARQL is modelled after RDQL so currently these are regex matches.
I don't think anyone has proposed SQL style LIKE.
> I wonder how librdf executes such queries? Does it index literals or
> will such queries result in full scans?
Rasqal is the query engine, it uses any available POSIX regex engine
to match. Redland is the data store, it does not provide literal
indexing in any of the current storage backends at this time. So
such queries do result in full scans of all literals for matches.
I already felt this was an issue but have not had it as a priority to
deal with for Redland development as it was not required by my
former or current funded projects.
> Also, is librdf datatype aware? Will it correctly interprete operators
> such as '<' for numerical literals?
Redland is datatype aware - it stores and retrieves them but it is
not a processor, so has no engine of any sort (query, inference,
datatype, programming language).
Rasqal is a query library and has an expression evaluator as part of
the constraint evaluation part of the query engine and handles all
the RDQL expressions, passing most of the test suite, see
More information about the redland-dev