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).
Rolf
source share