Neo4j Graph Database has the subsequent constructing blocks −
- Data Browser
Node is a fundamental unit of a Graph. It contains residences with key-cost pairs as shown in the following picture.
Here, Node Name = "Employee" and it contains a set of residences as key-cost pairs.
Property is a key-value pair to describe Graph Nodes and Relationships.
Key = Value
Where Key is a String and Value may be represented the usage of any Neo4j Data kinds.
Relationships are some other principal building block of a Graph Database. It connects nodes as depicted within the following discern.
Here, Emp and Dept are unique nodes. "WORKS_FOR" is a relationship among Emp and Dept nodes.
As it denotes, the arrow mark from Emp to Dept, this dating describes −
Emp WORKS_FOR Dept
Each dating contains one start node and one stop node.
Here, "Emp" is a start node, and "Dept" is an give up node.
As this courting arrow mark represents a courting from "Emp" node to "Dept" node, this relationship is referred to as an "Incoming Relationship" to "Dept" Node and "Outgoing Relationship" to "Emp" node.
Like nodes, relationships can also include properties as key-cost pairs.
Here, "WORKS_FOR" relationship has one assets as key-cost pair.
Id = 123
It represents an Id of this dating.
Label associates a commonplace call to a set of nodes or relationships. A node or relationship can contain one or more labels. We can create new labels to existing nodes or relationships. We can put off the existing labels from the existing nodes or relationships.
From the preceding diagram, we can have a look at that there are two nodes.
Left side node has a Label: "Emp" and the right aspect node has a Label: "Dept".
Relationship among those nodes also has a Label: "WORKS_FOR".
Note − Neo4j stores data in Properties of Nodes or Relationships.
Neo4j Data Browser
Once we set up Neo4j, we are able to get right of entry to Neo4j Data Browser the usage of the subsequent URL
Neo4j Data Browser is used to execute CQL instructions and consider the output.
Here, we want to execute all CQL instructions at dollar prompt: "$"
Type commands after the dollar symbol and click on the "Execute" button to run your commands.
It interacts with Neo4j Database Server, retrieves and shows the results simply beneath the dollar activate.
Use "VI View" button to view the results in diagrams layout. The above diagram indicates effects in "UI View" format.
Use "Grid View" button to view the effects in Grid View. The following diagram suggests the same results in "Grid View" format.
When we use "Grid View" to view our Query outcomes, we are able to export them into a file in exclusive formats.
Click the "Export CSV" button to export the outcomes in csv document layout.
Click the "Export JSON" button to export the outcomes in JSON document layout.
However, if we use "UI View" to see our Query effects, we will export them into a document in handiest one layout: JSON