What is the advantage of N-Triples over CSV for storing RDF triples?

asmaier

N-Triples is a line based serialization format for an RDF graph. Each line represents the subject, predicate and object of an RDF Triple separated by whitespace and ended with a dot like:

<http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> . 

More details can be found here: http://www.w3.org/TR/n-triples/

But why is it necessary to define such a format, if one could serialize RDF Triples simply using CSV like

http://one.example/subject1, http://one.example/predicate1, http://one.example/object1

I could even easily extend to support N-Quads, N-Quints, ... using CSV. What are the advantages of N-Triples over CSV for serializing RDF triples?

dajobe

Disclaimer: I'm the original editor of N-Triples and implemented it in Raptor http://librdf.org/raptor/ both the N-Triples original and the 2013 version.

There are multiple answers to this but it's basically ambiguity. CSV can't distinguish between a URI that looks like http://foo.com/ and a string http://foo.com/

In CSV

http://foo.com/,http://foo.com/,http://foo.com/

this could be a triple

(URI http://foo.com/, URI http://foo.com/, URI http://foo.com/)

or

(URI http://foo.com/, URI http://foo.com/, Literal http://foo.com/)

N-Triples adds <> and "" for distinguishing these cases

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What is the advantage of N-Triples over CSV for storing RDF triples?

From Dev

How to Convert rdf xml into n-triples?

From Dev

Reading RDF data in the N-Triples format

From Dev

Rdf duplicate triples

From Dev

Marklogic : advantage of using embedded triples over triple store

From Dev

Reading nested RDF Triples in Jena

From Dev

Reading nested RDF Triples in Jena

From Dev

Guidelines for RDF terms for building RDF triples

From Dev

How can generalized RDF triples easier show "the completeness of the RDFS entailment rules", and what does that even mean?

From Dev

C# parsing of Freebase RDF dump yields only 11.5 million N-Triples instead of 1.9 billion

From Dev

C# parsing of Freebase RDF dump yields only 11.5 million N-Triples instead of 1.9 billion

From Dev

Fast insertion of rdf triples using redland/c++

From Dev

Validate RDF triples against ontology in order to check correct structure

From Dev

Loading very large RDF triples into iGraph -> Fast vertices lookup?

From Dev

Validate RDF triples against ontology in order to check correct structure

From Dev

What is the advantage of using a date dimension table over directly storing a date?

From Dev

What is the advantage of using a date dimension table over directly storing a date?

From Dev

Numbering triples

From Dev

Numbering triples

From Dev

Parsing RDF triples with Go. Some items falsely-passing regex

From Dev

implementing in CUDA a large boolean sparse matrix (having possibly 10 million entries) for RDF triples

From Dev

Pythagorean triples, not congruent

From Dev

Handling duplication of Triples

From Dev

What is the advantage of iSCSI over SMB?

From Dev

What advantage is there to storing "this" in a local variable in a struct method?

From Dev

Difference between Graph Triples and EAV

From Dev

Reify triples in JSON-LD

From Dev

Convert a list into a sequence of string triples

From Dev

Bulk edit subject of triples in rdflib

Related Related

  1. 1

    What is the advantage of N-Triples over CSV for storing RDF triples?

  2. 2

    How to Convert rdf xml into n-triples?

  3. 3

    Reading RDF data in the N-Triples format

  4. 4

    Rdf duplicate triples

  5. 5

    Marklogic : advantage of using embedded triples over triple store

  6. 6

    Reading nested RDF Triples in Jena

  7. 7

    Reading nested RDF Triples in Jena

  8. 8

    Guidelines for RDF terms for building RDF triples

  9. 9

    How can generalized RDF triples easier show "the completeness of the RDFS entailment rules", and what does that even mean?

  10. 10

    C# parsing of Freebase RDF dump yields only 11.5 million N-Triples instead of 1.9 billion

  11. 11

    C# parsing of Freebase RDF dump yields only 11.5 million N-Triples instead of 1.9 billion

  12. 12

    Fast insertion of rdf triples using redland/c++

  13. 13

    Validate RDF triples against ontology in order to check correct structure

  14. 14

    Loading very large RDF triples into iGraph -> Fast vertices lookup?

  15. 15

    Validate RDF triples against ontology in order to check correct structure

  16. 16

    What is the advantage of using a date dimension table over directly storing a date?

  17. 17

    What is the advantage of using a date dimension table over directly storing a date?

  18. 18

    Numbering triples

  19. 19

    Numbering triples

  20. 20

    Parsing RDF triples with Go. Some items falsely-passing regex

  21. 21

    implementing in CUDA a large boolean sparse matrix (having possibly 10 million entries) for RDF triples

  22. 22

    Pythagorean triples, not congruent

  23. 23

    Handling duplication of Triples

  24. 24

    What is the advantage of iSCSI over SMB?

  25. 25

    What advantage is there to storing "this" in a local variable in a struct method?

  26. 26

    Difference between Graph Triples and EAV

  27. 27

    Reify triples in JSON-LD

  28. 28

    Convert a list into a sequence of string triples

  29. 29

    Bulk edit subject of triples in rdflib

HotTag

Archive