W3C home > Mailing lists > Public > semantic-web@w3.org > July 2007

RE: Named Graph Serialisation

From: P.L.Coetzee <P.L.Coetzee@open.ac.uk>
Date: Fri, 27 Jul 2007 13:13:17 +0100
Message-ID: <E0FEA5DF00E59E409F90C854A1B45BAA04CE1353@EPPING-EVS1.open.ac.uk>
To: "Tim Berners-Lee" <timbl@w3.org>, "Chris Bizer" <chris@bizer.de>, "Giovanni Tummarello" <g.tummarello@gmail.com>
Cc: <semantic-web@w3.org>


Thanks for the replies - some interesting food for thought here. 

Chris: what motivated the creation of TriG, if N3 already supports naming graphs through the mechanism Tim mentions below? Does Jena's N3 parser not support this syntax, or is there a more subtle difference I'm missing that was important for NG4J? Syntactically, TriG seems to be very similar to the N3 mechanism (with the exception of the :- graph naming operator).

Anyway thanks for the thoughts (and the pointer to SWSE's dumps, Giovanni; if, in the interests of keeping memory overhead low, I end up going with the somewhat-ugly N-Quads format, I'll look to maintain compliance with this layout. I do, however, get a 403 forbidden when trying to access the nq :))


-----Original Message-----
From: Tim Berners-Lee [mailto:timbl@w3.org]
Sent: Thu 26/07/2007 12:09
To: P.L.Coetzee
Cc: semantic-web@w3.org
Subject: Re: Named Graph Serialisation

Notation3 (n3) is the extension of basic RDF for very much that  
purpose, where an RDF graph itself can be a node in a graph, using  
{braces}. Like:

:reading1  cal:date "2007-09-12T05:70:00";
	ex:readings {   :water temp  23;  :presure 1.006.   air temp 22.1;  
pressre 1.007 }.
:reading2  cal:date "2007-09-12T05:70:00";
	ex:readings {   :water temp  23.4;  :presure 1.006.   air temp 22.1;  
pressre 1.007 }.
:reading3  cal:date "2007-09-12T05:70:00";
	ex:readings {   :water temp  23.2;  :presure 1.006.   air temp 22.1;  
pressre 1.023 }.
:reading4  cal:date "2007-09-12T05:70:00";
	ex:readings {   :water temp  23.;  :presure 1.006.   air temp 22.1;  
pressre 1.007 }.
:reading5  cal:date "2007-09-12T05:70:00";
	ex:readings {   :water temp  23;  :presure 1.006.   air temp 22.1;  
pressre 1.004 }.

You can use rules (eg N3 rules) to pull out things in flat plain RDF.

The notation above avoids the repetition of the graph ID on every quad.
(N3 also avoids repetition of subject as well.)



This can be serialized into a graph, by n3 reification into triples,  
but as you say it is impractically verbose and unreadable.

On 2007-07 -25, at 11:49, P.L.Coetzee wrote:

> Dear all,
> I have a fairly large set of data persisted in a quad-store,  
> consisting of a set of named graphs within a single dataset. Other  
> than TRiX, I've yet to come across any 'accepted' means of  
> seralising the graphs into a single RDF dump (ideally which could  
> be read in without massive memory overhead, such as can be easily  
> done with N-Triples).
> The obvious solution to me would be a sort of 'N-Quadruples',  
> whereby one serialises the Graph URI as the first element per line,  
> followed by the usual S-P-O triple pattern of N-Triples. This seems  
> like the simplest solution (in terms of ease of implementation,  
> readability, as well as for any future processing on the set). What  
> are the list's thoughts on such an approach; is there any prior art  
> that I'm missing, other standards that can achieve the same goals  
> that etc?
> Thanks in advance for your thoughts!
> Cheers,
> Peter
Received on Friday, 27 July 2007 12:13:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:26 UTC