W3C home > Mailing lists > Public > public-rdf-wg@w3.org > October 2011

Re: Scope of blank nodes in TriG?

From: Steve Harris <steve.harris@garlik.com>
Date: Mon, 17 Oct 2011 14:56:46 +0100
Cc: RDF Working Group WG <public-rdf-wg@w3.org>
Message-Id: <C7D467B3-D1F6-451C-A842-AD6B17A48D9C@garlik.com>
To: Richard Cyganiak <richard@cyganiak.de>
On 2011-10-17, at 14:29, Richard Cyganiak wrote:

> On 14 Oct 2011, at 12:35, Ian Davis wrote:
>> I think the TriG spec could be updated by the authors so blank nodes
>> are scoped to the document rather than the graph. It just seems like a
>> bug in the spec to me.
> 
> No, it's not a bug.
> 
> The original use case for TriG (this is years before SPARQL existed) was serializing collections of RDF documents in a single document. In that use case there can be no blank nodes shared between documents, so graph scope made sense and had the convenient side effect of simplifying serializer implementation.

It also simplifies the parse process.

Suppose I start parsing a TriG document and see:

<G1> { _:x a <Foo> }

then 100GB later in the file I find:

<G1734> { <x> :seeAlso _:x }

If there was document scope I would have to carry the assigned skolem form* for _:x around in my parser for the entire parse - that's fine if you only have a handful of bNodes, but with billions of them it can be quite resource intensive.

Hardly the end of the world, but it is a real issue.

- Steve

* assuming that the store handles bNodes like that. The ones I'm familiar with do, but I suspect some don't.

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Monday, 17 October 2011 13:57:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:46 GMT