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

Re: Named Graph Serialisation

From: Chris Bizer <chris@bizer.de>
Date: Fri, 27 Jul 2007 15:36:31 +0200
Message-ID: <003b01c7d053$2492c550$418d2da0@wrz03715>
To: <semantic-web@w3.org>


> 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).

N3 provides some features that go beyond the RDF and the Named Graphs
data model. For instance variables, universal and existential
quantification. It also allows cascading formula, meaning that
formulas may be used within other formulas thus allowing infinite
subgraph chains.A formula may also be used within triples like normal
nodes, meaning that formulas can be seen as subgraphs within an outer
graph formed by the N3 document.

All this is useful within Tim's cwm rules context, but a extension of
the underlying model that In or opinion goes to far for the normal use
case of exchanging sets of Named Graphs between repositories.

> Does Jena's N3 parser not support this syntax, or is there a more
> subtle difference I'm missing that
> was important for NG4J?

I would doubt that Jena's N3 parser supports Named Graphs as the
normal assumption within the Jena framework is to work on single Jena
models and not Named Graph sets. Please correct me if this is wrong in
the meantime.

NG4J adds the feature to handle Named Graphs sets to the Jena
framework.

Cheers

Chris

--
Chris Bizer
Freie Universitšt Berlin
Phone: +49 30 838 54057
Mail: chris@bizer.de
Web: www.bizer.de

----- Original Message ----- 
From: "P.L.Coetzee" <P.L.Coetzee@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>
Sent: Friday, July 27, 2007 2:13 PM
Subject: RE: Named Graph Serialisation


All,

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 :))

Cheers,
Peter


-----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

Peter,

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.)

http://www.w3.org/DesignIssues/Notation3

Tim

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 13:40:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:58 UTC