Neo4j 底层 架构 学习
今天领导问我Neo4j底层架构,调优等问题。平时只顾着优化cypther,这部分内容就没怎么看,决定深入了解Neo4j数据库。
上图
Neo4j底层总体架构
如图,Neo4j 包括Traversals Core API Cypther Node/Relationship Object cache Thread loacl diffs FS Cache HA Record files Transaction log Disk(s)
Neo4j的硬盘存储
Neo4j Storage Record Layout
节点 关系
这幅图其实也解释了 Neo4j里为什么一个节点可以有多个Label,但是一个关系只能有一个type
反证法:假如一个关系可以有多个type,张三和李四相互认识,张三和王五相互认识,李四和王五不认识。 那么如何表示张三、李四、王五 三个节点间的关系
如果一个关系有多个type表示上述例子中的关系反而很复杂了。




References
[1] 《Neo4j-Internals》
[2] Understanding Database Growth
[3] Neo4j的存储结构
[4] Neo4j 底层存储结构分析