Using the nodes syntax
In Cypher, a node is surrounded by parentheses, ()
, making it resemble a circle in a diagram. Here are some example usages in Cypher:
(p)
– This represents a node identified with thep
variable/alias. It can be of any type.()
– This represents a node that is not assigned a variable or an alias. This is normally called an anonymous node, as it cannot be referenced later, except as part of a path.(:Person)
– This represents a node with thePerson
label, but is not assigned to a variable or an alias.(p:Person)
– This represents a node with aPerson
label, identified with thep
variable/alias.(l:Location:Work)
– This represents a node with multiple labels,Location
andWork
, identified with thel
variable/alias.
Let’s move on to the relationships syntax.