Before loading the data
To start loading data with Cypher, we need to build the graph data model first. While Neo4j is a schemaless database, we still need to understand how our data will look in a graph representation and whether it can answer our questions effectively. This process involves understanding the data and seeing what the nodes and relationships would be and what would map to the properties. For example, say we have a list of events with date values in the source data:
- If we are looking for events in the sequence they occurred, then we can have the date as a property on the event node
- If our requirements are to look at the set of events by date, then making the date a node would help us to answer those questions more effectively
We will discuss these aspects in more detail with a sample dataset later in this chapter.
We will introduce the basics of graph data modeling first and the tools available for it before we continue with the data loading discussion...