Some questions are about things: "what is this user's email?". Others are about connections: "which people does Sara know through at most three introductions?", "which accounts share a phone number with an account flagged for fraud?", "what depends on this package, directly or indirectly?". Relational databases answer the first kind very well. For the second kind, where the path between records is the answer, a graph database is often the better fit.
The property graph model
Most graph databases, such as Neo4j, Memgraph and Amazon Neptune, use the property graph model:
Nodes are the entities: a person, a company, a product. A node has one or more labels ( Person , Company ) and properties (key and value pairs, like name: "Sara" ).
Relationships (edges) connect two nodes. Each has a type ( KNOWS , WORKS_AT , BOUGHT ), a direction, and can have its own properties ( since: 2021 ).
The key point: relationships are stored as first-class data, not computed at query time.…