Re: [sub-select] Some examples and discussion

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
sub-selects
assignment

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.

Lee



> 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