Warning:
This wiki has been archived and is now read-only.

CommentResponse:KK-7

From SPARQL Working Group
Jump to: navigation, search

This is the draft response to http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2011Jan/0009.html

--

Dear Kjetil,

There is a balance to be struck between potential confusion due to reusing bnode labels to identify different things and the convenience in composition of queries.

On balance, the WG believe that the approach of SPARQL 1.0, which avoids the confusion possibilities, is the better choice.

In case you want to compile queries from several BGPs that potentially share bnodes programmatically, you can proceed similar to RDF graph merge, where, when two graphs are merged, bnode labels are expected to be "standardized apart".

We would be grateful if you would acknowledge that your comment has been answered by sending a reply to this mailing list.

Axel

On behalf of the SPARQL working group.



All,

I'd like to throw out a minor thing, I don't know what's been said about it 
before: http://www.w3.org/TR/sparql11-query/#bgpBNodeLabels
says that:
"When using blank nodes of the form _:abc,  labels for blank nodes are scoped 
to the basic graph pattern.  A label can be used in only a single basic graph 
pattern in any query."

From a query writer's perspective, it is good that blank nodes are scoped to a 
BGP whereas variables are globally scoped. However, it would be nice if the 
blank node label didn't need to be used just a single time in a query, for 
practically the same reasons that lexical scoping is good for programming.

For instance, if two different programmers write code that produce BGPs for 
different parts of a query, and they work independently, currently, if they 
use the same label in different BGPs, there would be breakage. As such, using 
a variable or a blank node for variables you don't need projected are pretty 
much the same thing: If you recycle a variable you get unexpected results, if 
you recycle a blank node label you would get an error, as I understand it.

From a query writer's perspective, it would be nice if they were different -- 
it would be nice if you could just mindlessly use a blank node label again 
and again, you just need to make sure that they are unique in the scope of 
the BGP. I think this would ease writing very complex queries, in particular 
queries where different modules are involved.

Of course, this puts an extra burden on the query engine, so it may not be 
worth it, but I'd like to bring it up.


Cheers,

Kjetil