RDQL Regular expressions and pattern searches

Hi Andy, Hi All,

An area where I've found RDQL a little underspecified is in the syntax
for regex searches. RAP encloses the regex in quotes (e.g. "/regex/"),
I'm not sure what sesame does, and Jena regexes must be unquoted
(e.g. /regex/).

Unfortunately the grammar in the spec doesn't specify this so I'm not
sure which is 'correct'.


While I'm on the subject, the other unfortunate thing about RDQL
pattern searches is that most relational databases don't support
regexes and so for rdb backed stores the filtering has to be done
in-memory. Unfortunately the most common usage of this feature for me
is to do a global label search, which involves e.g.

SELECT ?subj, ?label 
WHERE (?subj,<rdfs:label>,?label) 
AND ?label =~ '/phi/i'

This is obviously a bit of a problem to do in-memory for large
stores. Is there potentual for a more restricted form of pattern in
RDQL that could be done in-database? 
e.g. something like SeRQLs 'LIKE' clause

(for those unfamiliar with seRQL/sesame, this does a case-insensitive
match with a single wildcard character '*' which matches zero or more
characters - this nicely mapps to LIKE and % in SQL).

Cheers,

Phil

Received on Tuesday, 11 May 2004 12:51:10 UTC