W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2009

Re: [sub-select] Some examples and discussion

From: Lee Feigenbaum <lee@thefigtrees.net>
Date: Thu, 12 Mar 2009 02:39:31 -0400
Message-ID: <49B8AE23.20100@thefigtrees.net>
To: "Seaborne, Andy" <andy.seaborne@hp.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
Seaborne, Andy wrote:
> Sub-select's would cost little in terms of spec changes.  That's not
> the same as implementation costs.
> The features that make sub-selects useful would be more costly to
> spec.

Andy, I don't get these two paragraphs - can you explain a bit?

In general, I like that sub-selects give a SQL-like (i.e. recognizable)
way to bring new functionality to SPARQL, and that they're already
implemented in at least one or two places.

My main concern with sub-selects is whether they are complex to properly
  specify & implement, which is why i ask for more clarification here.

> There are two places to consider in the algebra for sub-selects:
> adding sub-selects to the graph pattern matching is a matter of
> allowing a SELECT where a graph pattern can appear; sub-selects in
> expression positions requires some additional conditions (a single
> projected variable). It would fit naturally into an expanded model of
> query processing that including calculating values but, like
> assignment and select-expressions/sub-selects, we can choose to unify
> the concepts and say it is a syntactic rewrite to a sub-select in the
> graph pattern.  A technical point: the distinction between sequences
> and multi-sets needs to be removed or the reverse of operation of
> sequence to multi-set needs adding.

The idea of using ASK queries in expressions appeals to me as well,
though it doesn't necessarily read as well as !EXISTS in SQL. The
verbosity is similar though, I guess.

I'm curious as to the interplay between:

projected expressions

Is there a combination of these that makes the 3rd irrelevant? Or pairs 
of them that are far more useful when included together? That's the sort 
of thing I'm working to wrap my head around.


> Andy
> [F1] http://www.w3.org/2009/sparql/wiki/Feature:ProjectExpressions 
> [F2] http://www.w3.org/2009/sparql/wiki/Feature:AggregateFunctions 
> [F3] http://www.w3.org/2009/sparql/wiki/Feature:Assignment
> -------------------------------------------- Hewlett-Packard Limited 
> Registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered
> No: 690597 England
Received on Thursday, 12 March 2009 06:40:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:56 UTC