W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2004

RDQL Regular expressions and pattern searches

From: Phil Dawes <pdawes@users.sourceforge.net>
Date: Tue, 11 May 2004 17:50:16 +0100
Message-ID: <16545.1096.142511.304560@gargle.gargle.HOWL>
To: "Seaborne, Andy" <andy.seaborne@hp.com>
Cc: www-rdf-interest@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:07 GMT