Database Reference
In-Depth Information
Interactive console - Neo4j shell
Neo4j shell is a command-line utility for performing CRUD operations on the Neo4j data-
base. In this section, we will talk about the step-by-step process involved in executing
Cypher queries using
neo4j-shell
.
Perform the following steps to run your Cypher queries in
neo4j-shell
:
1. Assuming that your server is already started, open a new Command Prompt,
browse
<$NEO4J_HOME>/bin/
, and execute
neo4j-shell
. This will show
you the shell prompt where you can execute your Cypher queries.
2. Next, execute the following set of statements on the console:
CREATE (movies:Movies {Name:"Rocky",
ReleaseYear:"1976"});
MATCH (n) return n;
3. You will see something like the following screenshot on your console:
WOW!!! We are done! Simple, isn't it?
In the preceding example, we created a node called
Movies
with two attributes—
Name
and
ReleaseYear
. After creation, we fetched the same data using the
Match
query.