Ch. 2
Graph-Like Data Models
When connections between entities matter more than the entities themselves, graph models are the natural fit.
Many domains are inherently connected: social graphs, supply chains, knowledge bases, fraud detection. Representing these as relational tables with join tables works but makes traversal queries verbose and slow.
Property Graphs
In a property graph, vertices represent entities and edges represent relationships, both carrying key-value properties. Finding friends-of-friends or shortest paths becomes a native index traversal rather than a recursive SQL query.
- Cypher (Neo4j): pattern-matching syntax for graph traversal.
- SPARQL: W3C standard for RDF triple-stores.
- Datalog: logic-based queries with recursive rules.
property graphNeo4jNeptuneCypherSPARQLgraph traversal