Re: Scope of blank nodes in TriG?

On Fri, Oct 14, 2011 at 11:45 AM, William Waites <wwaites@tardis.ed.ac.uk>wrote:

> On Fri, 14 Oct 2011 10:45:34 +0100, Ian Davis <ian.davis@talis.com> said:
>
>    iand> Example Document 3 in the TriG spec[1] shows the same blank
>    iand> node label being used in different graphs. My interpretation
>    iand> of the example is that those blank nodes are distinct,
>    iand> i.e. the scope of blank node labels is the graph not the
>    iand> TriG document. How do the main graph stores behave? Is it
>    iand> possible to put the same blank node into two different
>    iand> graphs? If so, this information would not be serializable in
>    iand> TriG if my interpretation is correct.
>
> I agree with your interpretation. However 4store appears to have
> different behaviour here:
>
>    @prefix ex: <http://example.org/>.
>
>    ex:g1 {
>      _:s a ex:T
>    }
>
>    ex:g2 {
>      _:s a ex:T
>    }
>
> And this query:
>
>    SELECT * WHERE {
>        { GRAPH <http://example.org/g1> { ?s ?p ?o } } UNION
>        { GRAPH <http://example.org/g2> { ?s ?p ?o } }
>    }
>
> Shows the bnodes as having been merged when you run it here:
>
>    http://gallows.inf.ed.ac.uk/data/test/
>
> (note, I converted the TriG document to N-Quads to import it but I
> don't think that should matter)
>
>
I think  it does matter. What was the N-Quads document that was thew result
of the conversion.

For comparison I loaded the following quads into Jena/TDB

_:bnode <http://example.com/p> "foo" <http://example.com/g1> .
_:bnode <http://example.com/p> "bar" <http://example.com/g2> .

And get merged results from the query "describe ?s where { graph ?g {?s ?p
?o}}"

[] <http://example.com/p> "foo" ; <http://example.com/p> "bar" .


Ian
-- 
Ian Davis, Chief Technology Officer, Talis Group Ltd.
http://www.talis.com/ | Registered in England and Wales as 5382297

Received on Friday, 14 October 2011 10:58:22 UTC