RDF Serialization and Triplestores

In my earlier post  on Graph Databases I introduce RDF.  Briefly, RDF  is a language for expressing data models using statements expressed as triples. Each statement is composed of a subject, a predicate, and an object. RDF adds several important concepts that make these models much more precise and robust. These additions play an important role in removing ambiguity when transmitting semantic data between machines that may have no other knowledge of one another.  I find RDF very useful for integrating streams of related data.

In this post I will discuss the many ways RDF can be represented or serialized.

RDF Serialization

RDF serialization is the standard way to represent and share semantic data.  There are 5 serializations formats.

  • N-Triples, the simplest of notations;
  • N3, a compaction of the N-Triple format;
  • Turtle – subset of N3. Unlike full N3, which has an expressive power that goes much beyond RDF, Turtle can only serialize valid RDF graphs
  • RDF/XML, one of the most frequently used serialization formats
  • RDF in attributes (known as RDFa), which can be embedded in other serialization formats such as XHTML.

Example of Serialization using N3

@prefix foaf: <http://xmlns.com/foaf/0.1/&gt;.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#&gt;.
@prefix semperp: <http://semprog.com/people/&gt;.
@prefix tobes: <http://atiru.com/atiru.rdf#&gt;.

atiru:ts a foaf:Person;
foaf:homepage <http://atiru.com/&gt;;
foaf:interest <http://semprog.com&gt;;
foaf:knows semperp:Jon,
[ a foaf:Person;
foaf:mbox <mailto:jon@purple.com>;
foaf:name “Jon Foo”];
foaf:mbox <mailto:ananth_tiru@yahoo.com>;
foaf:name “Ananth Tiru”;
foaf:nick “atiru”.


Triplestores are Database Management Systems (DBMS) for data modeled using RDF. Triplestores can be broadly classified in three types categories: Native triplestores, RDBMS-backed triplestores and NoSQL triplestores.

Native triplestores are those that are implemented from scratch and exploit the RDF data model to efficiently store and access the RDF data. Examples of these include: 4Store, AllegroGraph, BigData, Jena TDB, Sesame, Stardog, OWLIM and uRiKa.

RDBMS-backed triplestores are built by adding an RDF specific layer to an existing RDBMS. Examples of these include : Jena SDB, IBM DB2, Oracle Database with Spatial and Graph option turned on and Virtuoso.

NoSQL triplestore are build on top of so called NoSQL databases which includes key-store, document databases.   Example includes Oracle NoSQL database.


About atiru

Product Strategist and architect for harnessing value from data.
This entry was posted in Topics related to Graph Databases and Compute, Linked Data (RDF) and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s