Chapter 2. Data modeling in Neo4j

This chapter covers

  • Why we need a data model for Neo4j
  • Domain modeling
  • Exploring additional domains

In this chapter, we’re going to talk about how and why we model data in Neo4j, and discuss approaches to data modeling in a graph database. We’ll look at alternative ways to model a given domain, making use of nodes, relationships, properties and labels in different ways. We’ll also present examples from different domains to give a sense of how flexible data modeling in Neo4j can be.

We’ll look at queries written in the Cypher query language. These are shown purely for illustration, to give an idea of how simple it is to query the models shown here: you don’t need to know anything about Cypher to start ...

Get Neo4j in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.