0
votes

from the cypher documentation, it gives the following running code

CREATE (n:Actor { name:"Tom Hanks" });

My question is, what is "n". it doesn't seem to be used in any subsequent example code and is not explained.

the original documentation is here

http://docs.neo4j.org/chunked/milestone/cypherdoc-create-nodes-and-relationships.html

Another point that is unclear to me is does "n:Actor" set the label of the node??

1

1 Answers

0
votes

i figured out what the "n" means.

n can be thought of assigning the result of the CREATE to a variable n. n can then be reused/referenced later on in the cypher.

a more meaningful name rather than n may have been "actor"

And the :Actor does set the label of the node to Actor