Graph database: Neo4j

A graph database stores data in a graph, the most generic of data structures, capable of elegantly representing any kind of data in a highly accessible way. Let’s follow along some graphs, using them to express themselves. We’ll “read” a graph by following arrows arond the diagram to form sentences.

Neo4j  is a high-performance, NOSQL graph database with all the features of a mature and robust database. The programmer works with an object-oriented, flexible network structure rather than with strict and static tables — yet enjoys all the benefits of a fully transactional, enterprise-strength database. For many applications, Neo4j offers performance improvements on the order of 1000x or more compared to relational DBs.

A Graph contains Nodes and Relationships

“A Graph –records data in–> Nodes –which have–> Properties.”

The simplest possible graph is a single Node, a record that has named values referred to as Properties. A Node could start with a single Property and grow to a few million, though that can get a little awkward. At some point it makes sense to distribute the data into multiple nodes, organized with explicit Relationships.

“Nodes –are organized by–> Relationships — which also have–> Properties.”

Relationships organize Nodes into arbitrary structures, allowing a Graph to resemble a List, a Tree, a Map, or a compound Entity – any of which can be combined into yet more complex, richly inter-connected structures.

A Graph contains Nodes and Relationships

“A Graph –records data in–> Nodes –which have–> Properties.”

The simplest possible graph is a single Node, a record that has named values referred to as Properties. A Node could start with a single Property and grow to a few million, though that can get a little awkward. At some point it makes sense to distribute the data into multiple nodes, organized with explicit Relationships.

“Nodes –are organized by–> Relationships — which also have–> Properties.”

Relationships organize Nodes into arbitrary structures, allowing a Graph to resemble a List, a Tree, a Map, or a compound Entity – any of which can be combined into yet more complex, richly inter-connected structures.

Query a Graph with a Traversal

“A Traversal –navigates–> a Graph; it –identifies–> Paths –which order–> Nodes.”

A Traversal is how you query a Graph, navigating from starting Nodes to related Nodes according to an algorithm, finding answers to questions like “what music do my friends like that I don’t yet own,” or “if this power supply goes down, what web services are affected?”

“Neo4j –is a–> Graph Database”

A Graph Database is a a fully transactional database that stores data structured as graphs. A graph is a flexible data structure that can naturally represent any kind of data, excelling at highly connected data.
Here is Emil Eifrem (founder and CEO of Neo Technology) talking about Neo4j and about what is happening in the social network world.


hasCode provides many tutorials on how to use Neo4j and on which cases.

Aucun commentaire:

Enregistrer un commentaire