Skip to content
About
Main content

Property graph versus RDF, and what graph forbids

What does modelling data as triples cost, and what can graph processing never give you?

Property graph versus RDF

Both model the same thing. They differ in where structure is bound: early (decided when data is written) or late (decided when data is read). This is the cleanest example of early versus across the platform.

  • A attaches a bag of key-value properties to vertices and edges. A vertex with twelve properties is one record.
  • An triple store decomposes everything into (subject, predicate, object) with no other structure. The same vertex with twelve properties is twelve triples.

Triples are maximal . Everything is self-describing, the schema is data, adding a property is inserting a row, and merging two independently designed datasets needs no migration. This is valuable when you do not control the sources and cannot agree a schema in advance. That is the real, defensible case for RDF, and it is an organizational argument rather than a technical one. RDF is the right model when schema agreement is more expensive than query cost.

The price is exactly what denormalization (storing related data together to avoid joins) exists to avoid. Rebuilding one entity is a multi-way self-join over the triple table. Query cost rises. estimation becomes much harder, because every join is over the same table with different constants for the . The single predicate column is also catastrophically skewed: a few predicates dominate. Triple stores respond by keeping multiple sorted permutations of the same triples (SPO, POS, OSP, ...) so that any access pattern has a matching sort order. That is the directional-index rule taken to its conclusion: with three columns and no fixed direction, you store the data several ways. Index-per-direction, paid in full.

Property graphs bind structure earlier. They get cheaper reads and better statistics, and they pay when the schema must change or two graphs must be merged. It is the same trade as schema-on-write versus schema-on-read, with the same deciding question: where does the failure surface, at write time or at read time?

One line: . Schema becomes data, and the cost is a self-join per property plus an index per access direction.


What graph forbids

  • You cannot prune a traversal by inspecting values, because reachability is not a predicate over stored data.
  • You cannot cost-estimate a traversal from summary statistics, because the cost depends on degrees not yet visited.
  • You cannot balance-partition a power-law graph without cutting most edges.
  • You cannot have a deep traversal that is not, in effect, a full scan.

The escapes and their prices

EscapePrice
Materialized adjacency () removes an index descent per hopimmutability, plus a reverse copy
converts random access into a shufflea barrier and a straggler tax per hop
Vertex-cut replication balances skewreplica
halves the exponentonly for point-to-point queries
Incremental maintenance avoids global recomputationthe usual delta-tracking machinery
Truncated iteration bounds the costonly where the answer is approximable
Multiple sorted permutations make any access direction cheaplinear growth in copies