Database Reference
In-Depth Information
• Creating a relationship between two nodes with attributes:
Relationships are shown using a line with an arrow ahead such as --> or <-- . It
is also known as a directed relationship, as it shows the flow or direction of the
relationship from one node to another; for example, let's create two nodes and
create a relationship between them:
CREATE (actor:Actor {Name: "Russell Crowe", Age: 50})
CREATE (movie:Movie {Title: "NOAH", Year:2014})
CREATE (actor)-[r:ACTED_IN{Language:"English"}]->
(movie);
The first two CREATE statements in the preceding block of code create two dis-
tinct nodes and the last statement creates the relationship between the nodes. Sim-
ilar to nodes, relationships can also have one or more attributes. The preceding
statement needs to be executed as one single command on your Neo4j shell.
Search WWH ::




Custom Search