What is a labeled property graph?

A labeled property graph (LPG) is a type of graph database.

In LPG-style databases the graph is comprised of nodes and relationships. Each node or relationship has an ID tag, one or more “labels” describing its type or class, and a set of “properties” that present values and a corresponding key to allow referencing.

Intuitively, two nodes are always joined by a relationship to form the larger structure of the graph.

There is no standardised query language for all LPG-style databases, but Cypher is the most widely adopted one.

Example:

We could retrieve information about the example above using a Cypher query like this:

MATCH (person1:Person)-[relationship:Married]->(person2:Person)
RETURN person1, relationship, person2
Down arrow icon.