Property graph

Also known as: labeled property graph

On this page 7

A property graph, also called a labeled property graph, is a data model in which data is stored as nodes connected by directed relationships, and both nodes and relationships carry labels or types and arbitrary key-value properties. Among database models, it is the dominant structure behind most commercial graph databases, and it treats connections between records as first-class stored data rather than as values computed at query time.

The model was shaped by practitioners rather than by a single formal theory, which explains its pragmatic design. In the field of databases it sits between the strict schema of the relational model and the schema-free flexibility of document stores, and it was standardized for querying through ISO/IEC 39075 GQL, published in 2024, and the graph extension SQL/PGQ in SQL:2023.

The building blocks of a property graph

A property graph consists of four kinds of elements that together describe entities and how they relate. Nodes (also called vertices) represent entities such as a customer, an account or a device. Relationships (also called edges) connect exactly two nodes, always have a direction and a type, and may themselves hold properties such as a start date or a weight.

Labels group nodes into roles, and a single node can carry several labels, for example Person and Employee. Properties are named values attached to nodes or relationships, typically strings, numbers, booleans, dates or lists. The table below summarizes the elements and their constraints in common implementations.

ElementPurposeTypical constraintsExample
NodeRepresents an entityZero or more labels, unique internal IDA customer record
RelationshipConnects two nodesExactly one type, one directionPURCHASED from customer to product
LabelClassifies nodesSeveral per node allowedPerson, Supplier
PropertyStores attribute valuesKey-value pairs, no nesting in most enginesname, amount, since
Core elements of the property graph model

Direction is stored but not enforced during reading: a query can follow a relationship in either direction at the same cost. Many engines also permit multiple relationships between the same pair of nodes, which makes the model a directed, labeled multigraph.

How storage enables fast traversal

The performance argument for property graphs rests on index-free adjacency, a storage technique in which each node holds direct physical pointers to its relationships. Following a connection then costs roughly constant time per hop, independent of the total size of the database, whereas a relational join usually requires an index lookup whose cost grows logarithmically with table size.

Not every product uses native graph storage. Some engines store a property graph on top of a key-value or wide-column store and rebuild adjacency through indexes, which scales horizontally but adds latency per hop. The difference matters most for deep, multi-hop queries such as finding all accounts within five transfers of a flagged account.

ApproachHow adjacency is foundStrengthWeakness
Native graph storageDirect record pointersFast deep traversalHarder to shard across machines
Graph layer on key-value storeIndex lookup per hopHorizontal scaleHigher latency per hop
Graph view over relational tablesJoins generated from SQL/PGQReuses existing dataDeep paths remain join-heavy
Storage approaches for property graph engines

The closest relative is the RDF triple store, which also models connected data but with a different philosophy. RDF represents every fact as a subject-predicate-object triple with globally unique IRIs, which favors data integration and formal reasoning, while the property graph favors compact local modeling and application performance. Attaching attributes to an edge is natural in a property graph but historically required reification in RDF, a gap that RDF-star addresses.

Relational and document models can represent the same information, yet they place the cost of relationships in different places. The following comparison shows where each model fits.

ModelUnit of dataRelationshipsTypical query language
Property graphNode and relationship with propertiesStored explicitly, traversed directlyCypher, GQL, Gremlin
RDF triple storeTriple with IRIsEvery fact is an edgeSPARQL
Relational modelRow in a tableForeign keys resolved by joinsSQL
Document modelNested JSON documentEmbedded or referenced manuallyVendor-specific APIs
Property graph versus neighboring data models

A property graph is a data model, while a graph database is a system that implements one or more graph models. A multi-model database may expose a property graph interface alongside documents or tables, so the two terms should not be used interchangeably.

Querying a property graph

Property graph queries are expressed as pattern matching over nodes and relationships rather than as joins over tables. In Cypher-style syntax, a pattern such as (c:Customer)-[:PURCHASED]->(p:Product) describes the shape of the subgraph to find, and the engine locates all matching instances.

  • Declarative pattern languages such as Cypher, openCypher and GQL describe what to match and let the planner choose the path.
  • Imperative traversal languages such as Apache TinkerPop Gremlin describe step by step how to walk the graph.
  • SQL/PGQ lets a relational database define a property graph view over existing tables and query it with graph patterns inside SQL.
  • Variable-length paths such as [:KNOWS*1..4] express recursive reachability that requires recursive common table expressions in plain SQL.

When to choose a property graph and when not to

A property graph pays off when relationships are the main subject of the questions, when their number and depth vary, and when the schema evolves often. It is a poor choice for workloads dominated by large aggregations over flat records, where columnar or relational engines are far more efficient.

SituationRecommended choiceReason
Fraud rings, multi-hop transfersProperty graphDeep traversal stays fast
Recommendations from shared behaviorProperty graphPaths express similarity naturally
Monthly sales totals by regionRelational or columnarAggregation over flat rows
Linked open data across organizationsRDF triple storeGlobal identifiers and shared vocabularies
Network and IT dependency mappingProperty graphImpact analysis follows dependencies
Decision guide for adopting a property graph

Common mistakes include modeling every attribute as a node, which inflates the graph without adding insight, and creating supernodes, single nodes with millions of relationships, such as one node for a country that every customer points to. Supernodes slow traversal sharply and are usually better expressed as properties or partitioned into finer nodes. Teams should also remember that most engines offer only optional schema constraints, so data quality depends on explicit uniqueness and existence rules.

The short version

A property graph stores information the way people often draw it on a whiteboard: as circles for things and arrows for connections. Each circle and each arrow can carry small notes, such as a name, a date or an amount.

Because the arrows are saved directly, the database can follow connections very quickly, much like walking along a map instead of searching a phone book again for every next stop. That makes it well suited to questions about who is linked to whom and how.

Where it makes a difference

A mid-sized bank wants to detect money mule networks, groups of accounts that pass stolen funds through several hops to hide their origin. In its relational warehouse, a query that follows transfers up to four steps away requires repeated self-joins on a table of 400 million transactions and runs for many minutes, which is too slow for screening payments.

The fraud team loads accounts, customers, devices and phone numbers as nodes, and transfers and logins as relationships with amount and timestamp properties. A pattern query finds accounts that share a device with a flagged customer and received funds within four hops in 48 hours. The query returns in under a second for typical cases, so analysts can review suspicious clusters during the same business day instead of after the money has left the bank.