Graph database
A graph database stores data as nodes and edges.
The core idea is that relationships are first-class data. Instead of treating relationships as something reconstructed through joins, the database stores and traverses them directly.
Example
(User)-[:FOLLOWS]->(User)
(Person)-[:WORKS_AT]->(Company)
(Product)-[:SIMILAR_TO]->(Product)
The query often starts from one node and follows relationships.
What it is good for
Graph databases are useful for:
- social graphs,
- recommendations,
- dependency networks,
- fraud rings,
- knowledge graphs,
- relationship-heavy exploration.
Tradeoff
Graph databases make traversal natural, but they are not always the best fit for simple tabular reporting or high-volume analytical scans. For those workloads, a relational database or columnar database may be a better fit.
Theory that matters here
Graph systems revolve around graph modeling, traversal depth, edge direction, path queries, relationship cardinality, and the cost of expanding from one node to many connected nodes.
Implementations
No dedicated implementation notes yet. Common systems in this category include Neo4j, JanusGraph, and graph modes in multi-model databases.