Graph Database Traversal
A graph database stores data as nodes connected by edges, where each edge is a real relationship with a type and direction. This suits social networks, recommendations, and fraud rings, where the connections matter as much as the data.
Index free adjacency
In a relational database, following relationships means joins that look up matching keys, and the cost grows with table size. Graph databases instead use index free adjacency: each node directly stores pointers to its neighbors. Hopping from one node to a connected node is a direct reference, not a search.
- Traversals stay fast even as the whole graph grows.
- Cost scales with the part of the graph you walk, not the total size.
- Deep questions like friends of friends of friends stay cheap.
Queries
Graph query languages express patterns to match, such as find people who follow someone who bought this item. The engine starts at anchor nodes and walks edges to fill the pattern.
Key idea
Index free adjacency lets a graph database hop directly between connected nodes, so traversals cost as much as the path walked rather than the whole dataset.