Property graphs are graphs that allow the user to store properties in nodes and edges along with node and edges. Each node in the property graph has a uniquely identifiable ID.
Note: Some properties can exist on a specific nodes/edges and not on other. Every node may have different set of properties. It is not necessary that all the nodes/edges will contain the same properties.
In the above example, we have two nodes and one edge. Each node has a unique ID present too. Edge shows the relationship between two nodes. In this case, "Anna" owns the "laptop." The edge contains one property that represents that "Anna" owns the "Laptop" since 6th June 2022. In this example, one node contains three properties and the other node contains two properties.
Property graphs are also sometimes known as a labeled property graph. Nodes can be assigned labels. Labels are similar to types. It enables the user to indicate the type of node that is being represented.
We have extended the above example. This time we have added labels (Person and Example) on our nodes. We assigned the label of Person to "Anna" and Equipments to "Laptop". Both labels describe the general type of the node. This is an example of a labeled property graph.
Resource Description Framework (RDF) is a measure for representing web resources and data interchange created and regulated by the World Wide Web Consortium (W3C).
RDF is the graph database. It is primarily the most common standard for dealing with data relationships.
RDF statement consists of three parts which are commonly known as a triple:
Subject: This is the source being described.
Predicate: This is used for relationship.
Object: This is the thing that is related to the subject.
This example is about a simple RDF statement about an employee. In this case, Harry (Subject) is employed by (Predicate), the company (Object).
Multiple related RDF statements make up an RDF graph:
This is an example of an RDF graph. In this example, we have added the role of Harry, which is of Manager. Also, we have added a relation that Harry is managing the interns.
The property graph is primarily about storage and querying, whereas Resource Description Framework is more about data exchange. The property graph uniquely identifies each node, whereas RDF doesn’t uniquely identify nodes of the same type. As RDF cannot identify unique nodes, we cannot qualify them or give them attributes. RDF statement consists of three parts: subject, predicate, and objects, whereas there is no such thing in property graphs.
Free Resources