Re: Question about blank node grammar

Hi Gary,

Matching BGPs is an extension point in SPARQL - algorithms for different 
entailments regimes can be used.  SPARQL 1.0 defines one for simple 
entailment as , and left further entailments regime as a possibility; 
SPARQL 1.1 defines some [1].

Each BGP is solved separately, then the results combined by SPARQL 
algebra operations.  So blank nodes are "matched" within the matching 
step and the way the blank node is matched is not exposed in the results.

Same label, different BGP has two possibilities:

1) Same label means same blank node across BGPs:

Having them span BGPs would mean that a BGP is not solved by just 
entailment with addition constraints from elsewhere the query come into 
play. It's not "matching" blank nodes when you get much beyond simple 
entailment.

2) Same label means same blank node within a BGP:

Each BGP was a "Turtle-like block" where same label/same blank node only 
applied within each BGP.

The SPARQL 1.0 WG thought that reusing a label while meaning a different 
blank node would be confusing.


Hence the decision to disallow reusing a label across BGPs.

 Andy

[1]
https://www.w3.org/TR/sparql11-entailment/

On 18/05/17 17:32, Gary King wrote:
> I’m curious as to why SPARQL disallows re-using the same blank node label in more that one BGP in a SPARQL query (https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#grammarBNodes).
> 
> What would be the problem with a query like
> 
> prefix : <ex://>
> select * {
>    { ?s :p1 _:b0 . }
>    union
>    { ?s :p2 _:b0 . }
> }
> 
> 
> thanks,
> 
> 
> --
> Gary Warren King

Received on Sunday, 21 May 2017 09:03:15 UTC