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

RE: candidate requirement: boolean query

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Fri, 18 Jun 2004 22:26:09 +0100
To: "'Eric Prud'hommeaux'" <eric@w3.org>
Cc: <public-rdf-dawg@w3.org>
Message-ID: <000d01c4557a$e14345f0$0a01a8c0@atlas>



-------- Original Message --------
> From: public-rdf-dawg-request@w3.org <>
> Date: 
> 
> On Fri, Jun 18, 2004 at 02:52:10PM +0100, Seaborne, Andy wrote:
> > 
> > -------- Original Message --------
> > > From: Kendall Clark <>
> > > Date: 18 June 2004 13:01
> > > 
> > > Folks,
> > > 
> > > I'm not wedded to this wording, but I think it at least hints at an
> > > important requirement. Ideally I'd like some kind of first class
> > > syntax for a boolean query -- SELECT BOOL or SELECT ? or ASK -- but
> > > the requirement isn't as much about syntax as it is about being able
> > > to query a graph and get back TRUE or FALSE.
> > 
> > An observation: if we have LIMIT and if we have the trailing flag,
> > "there was more", then "LIMIT 0" is the same as asking "does this
> > graph pattern match at all?" and it can be optimized as such on the
> > server - it would depend on the same decisions elsewhere for
> > disjunction.
> 
> Or LIMIT 1 and no trailing flag.
> I think you can do all the same things with that.

In the setting of querying an OWL inferred graph, it is possible to know of
the existence of a triple without knowing what it is:

<c> rdfs:subClassOf 
      [ rdf:type owl:Restriction ;
	  owl:onProperty <p> ;
        owl:minCardinality "1"^^xsd:nonNegativeInteger
      ] .

<x> rdf:type <c> .

then 

  (<x>  <p>  ?v)

is true but the system may not know a specific value for ?v

Maybe a system could return a bNode to indicate the existence of something
not determined and then the "LIMIT 1" approach works.  Using bNodes like
this does get into an issue of when to stop as there are infinitely many
solutions to any query of at least one result which don't add any
information.  That makes the interaction with LIMIT a bit tricky.

	Andy

> 
> > That is not to say that syntax for it would not be appropriate.
> 
> admittedly
Received on Friday, 18 June 2004 17:26:39 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:19 GMT