"Graph database" covers two models. One is RDF, as seen so far. The other is the labelled property graph (LPG) used by products such as Neo4j. Draw the same fact, "Minji has kept Nabi since 2021", both ways.
Draw the same fact three ways
"Minji has kept Nabi since 2021"
The value since sits directly on the KEEPS edge. Two nodes, one edge. Person and Cat are labels on the nodes.
(minji:Person {name: "Minji"})-[:KEEPS {since: 2021}]->(nabi:Cat {name: "Nabi"})What differs
| RDF | LPG | |
|---|---|---|
| Basic unit | Triple (subject, predicate, object) | Nodes and edges, both with key-value properties |
| Names | Global IRIs; data from other organisations merges as is | Internal ids and labels inside one database |
| Properties on an edge | Not directly; use an intermediate node or RDF 1.2 | Directly on the edge |
| Schema and meaning | W3C standards: RDFS, OWL, SHACL | Product-specific constraints; no standard semantics |
| Query | SPARQL (W3C) | Cypher, and the ISO standard GQL |
| Inference | Defined by the standards | Not part of the model; strong at path traversal and graph algorithms |
| Good fit | Integrating many sources, shared vocabularies, open data | Path analysis inside one system, recommendation, fraud detection |
One question, two languages
// LPG (Cypher / GQL)
MATCH (p:Person)-[k:KEEPS]->(c:Cat)
WHERE k.since < 2022
RETURN p.name, c.name# RDF (SPARQL), with "keeping" as a node
SELECT ?person ?cat WHERE {
?k a ex:Keeping ; ex:keeper ?person ; ex:pet ?cat ; ex:since ?y .
FILTER (?y < 2022)
}Do you have to choose?
No. An ontology is the blueprint that fixes what is what; where you store data that follows it is a separate choice. Tools exist that bring an RDF ontology into an LPG as labels and relationship names, and RDF 1.2 narrows the gap on edge values.
To combine data from many places so that meanings line up, RDF is the easier path. To traverse and analyse data in one place quickly, LPG is. An ontology serves as the shared vocabulary for both.