Skip to content
What Graph DBs Solve
step 1/5

Reading — step 1 of 5

Read

~1 min readGraph Models

What Graph DBs Solve

Graph databases store nodes (vertices) connected by edges (relationships). Both can have properties.

(Alice {age: 30}) -[FRIENDS_WITH {since: 2010}]-> (Bob {age: 32})
(Alice) -[WORKS_AT]-> (CompanyX)
(Bob) -[KNOWS]-> (CompanyX)

Why not relational?

  • Relationships are first-class. Joins for graph traversal in SQL are SLOW + verbose.
  • "Friends of friends of friends" in SQL = 3 self-joins. In graph DB = 1 traversal.
  • Schema flexibility: each node can have different properties.

Use cases:

  • Social networks: who knows whom; recommendations.
  • Fraud detection: ring detection in transactions.
  • Knowledge graphs: Google, Wikidata, Microsoft Satori.
  • Recommendation engines: Amazon "people who bought X also bought Y".
  • Network analysis: dependency graphs, supply chains.
  • Identity graphs: ad targeting (multi-touch attribution).

Real systems:

  • Neo4j: dominant. Property graph + Cypher.
  • TigerGraph: high-performance, GSQL.
  • Amazon Neptune: managed; supports both property graph (Gremlin) and RDF (SPARQL).
  • JanusGraph: open-source, Cassandra/HBase backend.
  • Memgraph: in-memory, Cypher.
  • DGraph: distributed, GraphQL.
  • NetworkX (Python): in-memory, library.

Two graph models:

  1. Property graph (Neo4j, Tiger, Memgraph): nodes + edges with properties.
  2. RDF triple store (Apache Jena, GraphDB, Stardog): (subject, predicate, object) triples.

Property graph dominates app development; RDF dominates semantic web / linked data.

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…