In this section, we will discuss the various syntactical details for creating nodes and relationships using Cypher.
Nodes and relationships are the two most important elements of Neo4j graph databases. They are created using the CREATE
clause of Cypher. Let us move forward and understand the process of creating nodes and relationships using Cypher.
Node is one of the core elements of Neo4j database. Every other element of Neo4j is either connected to nodes or is used to enhance the definition/description of a node. Let us delete the existing data, which we created in the previous chapter from our Neo4j database, and then see the step-by-step process of creating nodes.
Perform the following steps to clean up your Neo4j database:
Open your Linux console or shell and execute
<$NEO4J_HOME>/bin/neo4j-shell
.Execute the following Cypher queries to delete the data from the Neo4j database:
MATCH (n)-[r]-(n1) delete r,n.n1; MATCH n delete n;
And we...