Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between triplestores and graph databases?

Tags:

There are triplestores (semantic databases), and there are general-purpose graph databases.

Both are based on the similar concepts of linking one "item" to another via a relationship. Triplestores support RDF and are queried by SPARQL, but such add-ons can be (and are) implemented ontop of general-purpose graph databases as well.

What is the fundamental difference that would make you prefer a semantic db / triplestore to a general purpose graph database like neo4j?

like image 497
Bozho Avatar asked Aug 28 '13 08:08

Bozho


People also ask

Is RDF a graph database?

The RDF triplestore is a type of graph database that stores semantic facts. RDF, which stands for Resource Description Framework, is a model for data publishing and interchange on the Web standardized by W3C. Being a graph database, triplestores store data as a network of objects with materialized links between them.

What is the difference between relational database and graph database?

The most notable difference between the two is that graph databases store the relationships between data as data. Relational databases infer a focus on relationships between data but in a different way. The relational focus is between the columns of data tables, not data points.

Is Neo4j a Triplestore?

Since the Neo4j graph database is not a triple store, it is not equipped with a SPARQL query engine. However, Neo4j offers Cypher and for many semantic applications it should be possible to translate SPARQL to Cypher queries.

How is a graph database different?

How Does a Graph Database Differ from a Relational Database? The main difference is the way relationships between entities are stored. In a graph database, relationships are stored at the individual record level, while a relational database uses predefined structures, a.k.a. table definitions.


2 Answers

Triples stores are graph databases. RDF is a graph. Granted, triple stores tend to not store the information internally as a graph; that's sub-optimal for query answering, but they're still graph databases.

You'd prefer them to something like neo4j if you're interested in an ecosystem based on W3C standards. Makes interop with other RDF-based systems trivial, and it makes picking up everything and moving to a different triple store quite painless.

like image 99
Michael Avatar answered Sep 28 '22 10:09

Michael


To start with, besically all data-structures can be projected more or less painful into any underlying storage engine (or even your file system and text files). The reason to choose a certain data model and storage backend are IMHO:

  • your development and modelling preferences
  • your expected runtime performance for inserting, storing, and querying of your model.

As mentioned before, both RDBMSes and TripleStores tend to be useful at runtime in "shallow" traversing of JOIN or SparQL traversals, and do much work in caches or prepared views etc. Graph Databases (uniquely Neo4j) put the graph structure actually down to the storage layer and do pointer chasing (with a number of optimizations) on node-record level. Thus, when traversing the graph, you don't need to touch more than your current subgraph down to the storage layer, thus being able to traverse parts of the data without touching the whole graph, resulting in constant performance for a number of interesting scenarios.

like image 34
Peter Neubauer Avatar answered Sep 28 '22 10:09

Peter Neubauer