How does Neo4j store data domestically?

My question is from the point of view of the developer (not a special relation to the User) and can be a bit messy. I want to know how the structure of Nodes and relationships becomes logically derived in the database. For example, when I say that I have blah blah information. Where? - then in BOOK the answer will be either in the form of a grid or on the page. In the case of a DBMS, the data is stored in the Grid / Tabular format. But I can not understand how the graph is stored in the Neo4j / graph database. I am using the neo4j 2.1.2 client.

+8
data-structures neo4j
source share
1 answer

http://www.slideshare.net/thobe/an-overview-of-neo4j-internals is a bit outdated, but it gives you a good overview of the logical presentation of Neo4j.

A node links:

  • its first tag (my guess is that tags are stored as a separate list)
  • its first property (properties are organized as a singly linked list)
  • relationship of beginning and end

Relations are organized as doubly linked lists. The ratio indicates:

  • its first property (same as nodes)
  • previous and subsequent relation of its beginning node
  • previous and subsequent relation of its end node

Because of this chain of structure, the concept of workaround (i.e., a method for querying data) easily arises. This is why a graph database such as Neo4j excels at processing data structured by a graph.

My rough assumption would also be, since Neo4j version 2.1 (and the recently introduced tight node control ), the node relationships are separated by type. In doing so, if node N is, for example, starting node for 5 relationships of type A and for 5 million rels of type B, the intersection of rels of type A for N remains O (n = 5).

+3
source share

All Articles