Neo4j: Property Graph Modeling and Bounded Traversals
Relationships as first-class data, Cypher that reads like the question - and the unbounded path that will take your server down.
Neo4j stores a **property graph**: nodes with labels and properties, connected by directed relationships that also have types and properties. The claim that justifies it is **index-free adjacency** - a relationship is a pointer stored with the node, so traversing from one node to its neighbours costs the same whether the database holds a thousand nodes or a billion. In a relational database, "friends of friends of friends" is three joins whose cost grows with the tables; here it is three pointer hops, and the difference becomes decisive somewhere around the third or fourth hop.
Overview
**Cypher is the reason people enjoy this database**, and the reason they get into trouble. `MATCH (a:Person)-[:KNOWS]->(b:Person)-[:KNOWS]->(c:Person)` reads like the question it asks, which makes graph queries dramatically clearer than their SQL equivalents. It also makes it trivially easy to write a query that is correct and will never finish: **`MATCH (a)-[*]-(b)` is an unbounded traversal of your entire graph**, and on a well-connected dataset it will consume all available memory before it returns anything. The single most important discipline in this course is **bounding every traversal** - by hops, by relationship type, by direction, and by an anchored starting point - and `PROFILE` is how you prove you did.
Seven modules, about 85 hours. The capstone is a fraud relationship graph with bounded path queries, explain plans and access controls.
Introduction
For a sandbox, **Neo4j Desktop** or `docker run -p 7474:7474 -p 7687:7687 -e NEO4J_AUTH=neo4j/password neo4j:5` is enough for most of the course. **Neo4j Browser** at port 7474 is genuinely excellent and you should keep it open - it visualises results as a graph, which makes a wrong model obvious in a way that a table of rows does not. Module 5's clustering work needs either Enterprise Edition or **Aura**, the managed service, and the laboratory includes a design exercise for anyone who cannot run a cluster.
Note the edition boundary, because it affects what you can do: **Community Edition is single-instance, with one database, no role-based access control and no clustering**. Enterprise adds multiple databases, RBAC, clustering and hot backups. Aura is managed Enterprise. Modules 5 and 6 are written so that the core content works on Community with the Enterprise-only parts clearly marked as design exercises.
One habit from the first module: **`PROFILE` every query you intend to run twice**. It shows you rows passing through each operator and - the number that matters - **database hits**, which is the actual work done. A Cypher query that looks like one line can be a full graph scan, and `PROFILE` is the only thing that tells you.
What you will be able to do
- Explain the property graph model and index-free adjacency
- Write Cypher for reads, writes, patterns and aggregation
- Use MERGE correctly, and explain the trap it contains
- Model a domain as a graph, and defend node-against-relationship decisions
- Create constraints and indexes, and state what each one serves
- Write variable-length and shortest-path queries with explicit bounds
- Explain why an unbounded traversal is dangerous and demonstrate it safely
- Use subqueries, CALL and list comprehensions for complex queries
- Manage transactions and driver sessions, including retries
- Read PROFILE and EXPLAIN output, and act on database hits
- Reason about cardinality through a traversal and bound it
- Describe the common graph algorithms and when each applies
- Perform backup and restore, and record a measured RPO and RTO
- Use the bulk import tools for a large initial load
- Describe clustering and routing, and state the consistency implications
- Implement roles, privileges, TLS and query limits
- Compare Aura with self-managed, including cost
- Produce a deployment, sizing and cost checklist
What each level covers
5 levels · 7 lessons
-
Beginner - Foundations
The property graph and Cypher; then the modelling decisions that make or break a graph.
2 lessons 12 min of reading
Start with Nodes, Relationships, Properties and Cypher Basics → -
Intermediate - Application Behaviour
Paths, the bounds that keep them safe, and the driver behaviour around transactions.
1 lesson 8 min of reading
Start with Variable-Length Paths, Shortest Paths and Transactions → -
Advanced - Performance and Reliability
Reading plans and bounding cardinality; then backup, import and clustering.
2 lessons 14 min of reading
Start with PROFILE, Cardinality, Index Tuning and Graph Algorithms → -
Expert - Security and Production Architecture
RBAC where the edition allows it, query limits as a safety control, and Aura against self-managed.
1 lesson 10 min of reading
Start with Roles, Privileges, TLS, Query Limits and Monitoring → -
Capstone
One fraud graph, defended on bounded traversals, profiled queries and enforced access control.
1 lesson 6 min of reading
Start with Capstone - Fraud Relationship Graph →
Guides and articles
Longer reading about this subject, written alongside the course.
Before you start
- Neo4j 5 or later, Community Edition or Aura
- Neo4j Browser, and one programming language with the official driver
- Enterprise Edition or Aura for the clustering and RBAC laboratories
- The programme's shared foundations
Common questions
- What does the Neo4j: Property Graph Modeling and Bounded Traversals course cover?
- It is 5 levels and 7 lessons: Beginner - Foundations; Intermediate - Application Behaviour; Advanced - Performance and Reliability; Expert - Security and Production Architecture; Capstone. Each level ends with a quiz, and the last one is an exam over the whole course.
- How long does it take?
- About 50 minutes of reading and exercises - roughly 0.8 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
- What do I need to know first?
- Neo4j 5 or later, Community Edition or Aura. Neo4j Browser, and one programming language with the official driver. Enterprise Edition or Aura for the clustering and RBAC laboratories. The programme's shared foundations.
- Is it free?
- Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
- What will I be able to do afterwards?
- Explain the property graph model and index-free adjacency. Write Cypher for reads, writes, patterns and aggregation. Use MERGE correctly, and explain the trap it contains. Model a domain as a graph, and defend node-against-relationship decisions. Create constraints and indexes, and state what each one serves. Write variable-length and shortest-path queries with explicit bounds. Explain why an unbounded traversal is dangerous and demonstrate it safely. Use subqueries, CALL and list comprehensions for complex queries. Manage transactions and driver sessions, including retries. Read PROFILE and EXPLAIN output, and act on database hits. Reason about cardinality through a traversal and bound it. Describe the common graph algorithms and when each applies. Perform backup and restore, and record a measured RPO and RTO. Use the bulk import tools for a large initial load. Describe clustering and routing, and state the consistency implications. Implement roles, privileges, TLS and query limits. Compare Aura with self-managed, including cost. Produce a deployment, sizing and cost checklist.