Calculations of Nodes and Relationships
If we have 10000 calls, 2000 people and 5 cities, then our graph should have 12005 nodes. Given that there are 3 properties for each call, 3 for each person, and 1 for each city, we have a total of 36005 properties.
To calculate the total number of relationships, we can look into the db schema using command line 9 above. The schema is shown below. A person node has one relationship with the city and two (IN and OUT) relationships with the call. Given we have 10000 calls and 2000 people, we would have 10000×2 (IN and OUT) + 2000×1 (Person to City), giving us a total of 22000 relationships.
Cypher Basics
The main idea to understand is the concept of Graph Pattern Matching. There are no tables! Instead we an infinity plain surface and all the nodes are just placed on it. We have nodes and each one has a Node label, for example, (:City) or (:Person). These nodes are connected by relationships, in our case, [FROM], [IN], and [OUT].
How to find something?
To find something, we need to use matching patterns of these nodes and relationships. In Cypher we say, RETURN me data, that MATCH this pattern. In Cypher, there are no tables and no joins but nodes are connected by relationships.
Below are few basic commands:

CREATE – to create data

MATCH – specify a pattern of nodes and relationships

WHERE – set filters to the results

RETURN – request particular results

DISTINCT – return unique results

PROFILE or EXPLAIN – understand how your query works

Use () parenthesis to indicate a node

Use [] to indicate relationships

CALL db.schema.visualization() – to visualise the schema of database
Node syntax

() – all types of nodes

(a) – all types of nodes via variable “a”

(:Label) – all nodes with Label

(c:City) – all nodes of type “City” via “c”
An example: MATCH (c:City) RETURN c
Relationship syntax

–> – relationship direction

[:REL_TYPE] – relationship of specified type

[:FROM]> – directed relationship of type FROM
The below query is as follows: Search for the person Natalia and return the City she is from:
MATCH (p:Person)[:FROM]>(c:City)
WHERE p.name = “Natalia”
RETURN p, c