-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Graph Data Processing with Cypher
By :

This section discusses how you can work with a local Database Management System (DBMS) instance. We can perform multiple operations on an instance. We can start a stopped instance and once an instance is started, we can launch the browser and work with the database instance.
When an instance is selected in a project, it will show the buttons to start the instance. The following screenshot showcases this:
Figure 1.22 – Starting the instance
Click on the Start button to start the instance.
When the instance is available to query, the Open button will be activated. The following screenshot demonstrates this:
Figure 1.23 – Opening the browser
Click on the Open button to open the browser. If you need to create another database, you can use the Create Database button to create a new database on this instance. By default, a database named neo4j will be created.
The browser looks as shown in the following screenshot. It can be used to query the database.
Figure 1.24 – Neo4j Browser
The Neo4j Browser interface is used to execute Cypher queries against a database:
The query area is where Cypher queries are written. Click on the blue arrow to execute the query. The results will be shown below the query area.
To get help with browser usage, you can enter :help
in the query area. Neo4j Browser will show all the commands available with descriptions, as shown by the following figure:
Figure 1.25 – Browser help
If you scroll down, you will see links for various guides for sample graphs to play with. When you click on the link, you get a guided tour of content that the user can follow by clicking along the way. Here are some sample graph concepts and Cypher guides to illustrate how it works:
Figure 1.26 – Graph concepts
The graph concepts guide provides basic concepts for the user to review before working with Cypher. For new graph database users, this would be a very valuable guide to follow to review the basic concepts.
Figure 1.27 – Cypher help
The Cypher help guide introduces keywords and the basic usage of building queries using these keywords. For new users, this provides a good introduction to Cypher in a quick and clean fashion.
Next, we will take a look at the administrative aspect of the local instance.
We will take a look at administrative and filesystem aspects in this section. When you click on the … icon, it shows a drop-down menu displaying the additional options available, as shown in the following screenshot:
Figure 1.28 – Additional options to manage an instance
As you can see, it provides options to manage the settings, see the logs, look at the folder system where the instance is available, see the terminal, and so on.
When you click on Settings, it brings up the settings UI to view and modify the settings for this instance.
Figure 1.29 – Neo4j instance settings
When you modify the settings, the Apply button at the bottom will become activated and an Undo button will appear. When you click the Apply button, it will update the server configuration and restart the instance so that these configurations are applied. The Undo button will undo only the latest changes made. When you click on Reset to defaults, it will reset all the configuration values to the original defaults and restart the server.
When you click on Logs, you will be faced with the system log window, as shown in the following screenshot:
Figure 1.30 – Instance log
There are four different logs are provided by Neo4j, and they are as follows:
neo4j.log
. This is the basic system log. You can click on the filenames at the top to see debug.log
, query.log
, or security.log
.debug.log
contains detailed information to help you troubleshoot the server.query.log
contains the queries issued against the server.security.log
contains the authentication-related logging details.When you click Terminal menu item, you get a terminal or command-line window with the directory changed to the location of the DBMS instance.
Figure 1.31 – Local DBMS instance terminal window
You can do almost all the things that we’ve been using the UI to do in the terminal. You can edit a configuration, see logs, and start/stop an instance.
When you click on Open Folder menu item, you’ll see a submenu:
Figure 1.32 – Local DBMS instance file explorer
Depending on which submenu is selected, you will get a finder or file explorer navigated to the root of the installation directory or any of the other sub-directories that are selected. The following screenshot shows the root directory file window:
Figure 1.33 – Local DBMS instance root directory
When you select any of the sub-menu items, such as import, plugins ,logs, or configuration, it will navigate directly to the import, logs, plugins, or conf directory.