W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2004

Re: Potential Requirement: Predicate support with boolean operators

From: Eric Prud'hommeaux <eric@w3.org>
Date: Wed, 5 May 2004 10:28:52 +0900
To: Dan Connolly <connolly@w3.org>
Cc: Farrukh Najmi <Farrukh.Najmi@Sun.COM>, RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-ID: <20040505012852.GH9495@w3.org>

On Tue, May 04, 2004 at 05:29:29PM -0500, Dan Connolly wrote:
> On Tue, 2004-05-04 at 15:41, Farrukh Najmi wrote:
> > I have been scanning the list archives wondering how much discussion has 
> > occurred on having a requirement to support
> > predicates with boolean operators (AND, OR, NOT).
> > 
> > What I find is that there has been a few postings that talk about 
> > Negation or Conjunction or Disjunction support as potential use cases or 
> > requirements.
> > 
> > However, when I read the latest Use Cases and Requirements draft I do 
> > not believe I see a requirement that focuses explicitly on
> > supporting multiple predicates in the query syntax that can be combined 
> > using boolean operators. Is this an explicit omission or
> > has it just been missed?
> I'm not sure. In the postings you have seen, is there a particular
> phrasing of the requirement that appeals to you?
> It's entirely possible that there is a requirement that the WG
> would support but nobody has managed to write it down yet.
> FYI, the implementations I am familiar with have limited support
> for disjunction and negation: limited to comparing
> datatype values.
> Perhaps some of the implementors would like to relate
> their experience?

I have [1], but it didn't seem to motivate people. In the Annotea
service, I use a few Algae queries like:

------------ example queries --------------------
ask (?reply rdf:type t:Reply.
     ?reply t:root <foo>.
     (?reply dc0:title ?title || 
      ?reply dc1:title ?title)
collect (?reply ?title)


ask (<bar>    rdf:type    a:Annotation .
     <bar>    a:annotates ?annotates.
     <bar>    a:context   ?context.
     ( <bar>  dc0:creator ?creator ||
       <bar>  dc1:creator ?creator )
     ?creator a:E-mail    ?email.
     ?creator a:name      ?name.
     <bar>    a:ceated    ?created.
     ( <bar>  dc0:date    ?date || 
       <bar>  dc1:date    ?date )
     <bar>    a:body      ?body .
     ?body    http:Body   ?bodyData.
     ?body    http:ContentType ?contentType
collect (?annotation ?body ?creator ?date ?contentType)

Note, the latter query needs to be expressed as four separate queries
if disjunction is not used.
---------- end example queries -------------------

We've had some discussion around disjunction limited to property
values (for example, ?creator is "Bob" or "Joe" or "Sue"). During the
face to face, someone said that disjunctions with different properties
was difficult, but my implementation experience hasn't born that out
in either an in-memory query engine or a translation to SQL*.

* Ok, so the translation to SQL _can_ be tricky [2].

[1] http://lists.w3.org/Archives/Public/public-rdf-dawg/2004JanMar/0083
[2] http://www.w3.org/2003/11/01-RDF-SQL-tmp/notes

> >  If explicitly dropped as a requirement can 
> > anyone explain the rationale for the decision. Thanks for your
> > help.
> -- 
> Dan Connolly, W3C http://www.w3.org/People/Connolly/
> see you at the WWW2004 in NY 17-22 May?


office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +1.857.222.5741

Feel free to forward this message to any list for any purpose other than
email address distribution.
Received on Tuesday, 4 May 2004 21:29:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:26 UTC