Re: tests around comparators in the graph constraint

On Tue, 14 Dec 2004 04:18:05 -0500, Eric Prud'hommeaux <eric@w3.org> wrote:

> On Mon, Dec 13, 2004 at 10:30:35AM -0600, Dan Connolly wrote:
> > ACTION: EricP to sketch tests around comparators in the graph
> > constraint
> 
> Given a graph:
> 
>     :book1 dc:title "SPARQL Tutorial" .
>     :book1 ns:price 41 .
> 
> We can ask for the titles of the books that cost less than $42:
> 
>     SELECT ?title
>      WHERE (?book dc:title ?title)
>            (?book ns:price ?price)
>        AND (?price < 42)
> 
> or we can use an XQuery (XPath really) function
> 
>     SELECT ?title
>      WHERE (?book dc:title ?title)
>            (?book ns:price ?price)
>        AND (?price op:lessThan 42)

that's not the syntax.  AND takes expressions, not a graph pattern,
so it should be AND &op:lessThan(?price, 42).


> Simon suggested we look at expressing that in the WHERE clause:
> 
>     SELECT ?title ?price
>      WHERE (?book dc:title ?title)
>            (?book ns:price ?price)
>            (?price op:lessThan 42)
> 
> which would presumable match the above data. But would it match

It won't work with any existing RDQL-like system I have seen
as it is assumes an entirely different operation from matching
triples and closer to rules.  I oppose this expansion.

> 
>     :book1 dc:title "SPARQL Tutorial" .
>     :book1 ns:price :price .
>     :price op:lessThan 42.

The only answer for graph pattern matches.

> or
> 
>     :book1 dc:title "SPARQL Tutorial" .
>     :book1 ns:price 43 .
>     43 op:lessThan 42.

Requires a rules engine - seems out of scope for this WG to me.

> ? Generally, how do we distinguish between asserted triples and
> those inferred? We may want to, especially given that querying a
> representation of a query can leave lots of triples in the op
> namespace around, potentially confusing or misleading the
> querier.

Sounds like asking for proof information, also out of scope.

Dave

Received on Tuesday, 14 December 2004 10:08:29 UTC