What is a property graph?¶
In graph modeling, a property graph represents a well-defined structure consisting of nodes and edges, which can be associated with properties. These fundamental elements form a simple toolkit for modeling complex systems intuitively and powerfully.
Nodes¶
Nodes serve as fundamental building blocks and can be used to represent anything, for example, real-world objects like pumps:
graph LR;
Pump((Pump))
Edges¶
Edges denote relationships between nodes. This example adds a valve node and an edge to illustrate their connection:
graph LR;
Pump((Pump))
Valve((Valve))
Pump-- flows-to -->Valve
Properties¶
Nodes and edges can have properties that provide additional context or information. These properties can include types, such as Pump
or flows-to
, but they can also include other attributes describing the nodes and edges. For example:
graph LR;
Pump(("Pump<br>equipmentId: xyz123"))
Valve(("Valve<br>state: OPEN"))
Pump--"flows-to<br>maxPressure: 60"-->Valve