cloudparts

Many-hop relationship queries

Following chains of relationships several steps deep, such as friends of friends, fraud rings, dependency trees or routes, at interactive speed.

What it asks of a system

Some questions are about paths rather than rows: who is within three hops of this account, which packages depend on this library through any chain, what is the shortest route between two places. In a relational database each hop is another join, and the number of rows grows with every step, so variable-length paths get slow and awkward to write. A graph database stores relationships as first-class records next to the nodes they connect and lets a query walk from a node to its neighbours directly, with languages such as Cypher, GQL or Gremlin that express paths of unknown length.

To judge a system, test the queries you actually run, at the depth you need, on data with your real skew, because a few nodes with millions of edges (supernodes) dominate the cost. Check whether a traversal can span machines or must fit on one, how writes and transactions work, and whether the vendor has run the LDBC Social Network Benchmark, whose Interactive workload mixes neighbourhood reads with continuous inserts.

Good at it · 5

Compare side by side

Graph databases

Sources

Why each technology is listed comes from the sources on its own page.