Neo4j (Graph Database)
maang.io System Design Series
Neo4j stores data as a property graph — nodes and relationships as first-class citizens. Its key trick is index-free adjacency: relationships are direct pointers, so traversing them is O(1) per hop instead of a JOIN. That makes deep, connected queries (recommendations, fraud rings, social graphs) fast where relational databases choke, all expressed in the Cypher query language.
This deep dive comes in three parts:
- Foundations & Core Concepts — the property-graph model, index-free adjacency, and Cypher.
- Internals — the record store, linked-list traversal, and where graphs win, with worked numbers.
- Interview — Staff/Principal Q&A: graph-vs-relational and modeling connected data.