Re: shared bnodes (Skolems, SPARQL)

On 31 Aug 2012, at 14:29, Andy Seaborne wrote:

> 
>>>> <http://example.com/a> { _:a a <Foo> }
>>>> <http://example.com/b> { _:a a <Bar> }
> 
> and also related ...
> 
> PREFIX : <http://example/>
> 
> INSERT DATA
> {
>  GRAPH :g1 { :s1 :p1 _:a }
>  GRAPH :g2 { :s2 :p2 _:a }
> }
> 
> followed by ...
> 
> SELECT * { GRAPH ?g { ?s ?p ?o } }
> 
> or
> 
> SELECT ?g1 ?g2 ?o {
>  GRAPH ?g1 { ?s2 ?p2 ?o }
>  GRAPH ?g2 { ?s2 ?p2 ?o }
> }
> 
>>>> 
>>>> i.e. is there one bNode in two graphs, or two one in each graph.
>>> 
>>> Exactly.   This is ISSUE-21 ("Can Node-IDs be shared between parts of a quad/multigraph format?")
>>> 
>>> We could do a strawpoll on that here and now.
>>> 
>>> My vote, not surprising anyone, would be:
>>> 
>>> +1 (shared bnodes are needed for several use cases and are simpler than using Skolem nodes)
>> 
>> 
>> -0.5 it's a significant change in behaviour for some systems, with unknown implications [would be -1 if Jena didn't do it already]
>> 
>> We're not really big users of Trig, so I'd like to hear from people that are - if there aren't any big users of Trig, then I guess we probably should make the change, but I have to question why were bothering.
> 
> Jena and Sesame do the same thing as each other (TriG, NQuads, SPARQL Update)
> 
> Redland/rapper does not keep bnode labels across graphs in TriG apart - it simply copies the label across unchanged.

I've not tried redland, but raptor renumbers them internally. I believe it's possible to support either behaviour when using rapper, but I'd have to check.

Either way it seem that unifying bNodes across graphs in TriG is common enough that it won't surprise anyone.

- Steve

-- 
Steve Harris, CTO
Garlik, a part of Experian
+44 7854 417 874  http://www.garlik.com/
Registered in England and Wales 653331 VAT # 887 1335 93
Registered office: Landmark House, Experian Way, Nottingham, Notts, NG80 1ZZ

Received on Saturday, 1 September 2012 11:33:37 UTC