Database Reference
In-Depth Information
Properties : Properties are viewed as attributes and do not have their own existen-
ce. They are related either to nodes or to relationships. Nodes and relationships
can both have their own set of properties.
Labels : Labels are used to construct a group of nodes into sets. Nodes that are
labeled with the same label belong to the same set, which can be further used to
create indexes for faster retrieval, mark temporary states of certain nodes, and
there could be many more, based on the domain model.
Let's see how all of these four forms are related to each other and represented within
Neo4j.
A graph essentially consists of nodes, which can also have properties. Nodes are linked to
other nodes. The link between two nodes is known as a relationship, which also can have
properties. Nodes can also have labels, which are used for grouping the nodes.
Let's take up a use case to understand data modeling in Neo4j. John is a male and his age
is 24. He is married to a female named Mary whose age is 20. John and Mary got married
in 2012.
Now, let's develop the data model for the preceding use case in Neo4j:
John and Mary are two different nodes.
Search WWH ::




Custom Search