Course contentsShow
← System Design
Lesson 453 of 1,91913. NoSQL: Graph DatabasesFree lesson

Property Graphs vs RDF Triples

Comparing property graph model (nodes, edges, properties) with RDF triple stores (subject-predicate-object).

Property Graphs vs RDF Triples

What you'll learn: How the two main graph data models—property graphs and RDF triples—differ in structure and usage.


Two Ways to Model Connected Data

Graph databases use two primary models to represent relationships: property graphs and RDF triple stores. While both excel at connected data, they structure information differently.

Property Graph Model

A property graph consists of:

  • Nodes (entities) with labels and key-value properties
  • Edges (relationships) that are also first-class citizens with types and properties
  • Multiple properties attached directly to both nodes and edges

Think of a social network: a Person node might have properties like name: "Alice" and age: 30, connected by a FRIENDS_WITH edge that has a since: 2020 property.

RDF Triple Model

RDF (Resource Description Framework) structures data as triples:

  • Subject (the thing)
  • Predicate (the relationship)
  • Object (the value or another thing)

Each statement is atomic: (Alice, friendsWith, Bob) or (Alice, hasAge, 30). Properties become separate triples rather than being embedded in entities.

Key Differences

AspectProperty GraphRDF Triples
StructureRich nodes/edges with propertiesSimple subject-predicate-object
Edge propertiesNative supportRequires reification (extra nodes)
StandardsImplementation-specificW3C standards (RDF, SPARQL)
Typical useApplication graphs, recommendationsKnowledge graphs, semantic web

Property graphs feel more intuitive for application development—you can directly attach metadata to relationships. RDF excels at data integration and formal semantics, where standardized vocabularies matter.

Key Takeaway: Property graphs store rich properties on nodes and edges directly, while RDF triple stores decompose all data into atomic subject-predicate-object statements—choose based on whether you need application flexibility or semantic web standards.