You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Graph data modelling is the process of designing your data structure using nodes, relationships, properties, and labels. A well-designed graph model makes queries intuitive, performant, and easy to evolve.
Nodes represent entities — the things in your domain:
:Person, :Employee)(:Person {name: "Alice", age: 30})
(:Product {name: "Laptop", price: 999.99})
(:City {name: "London", country: "UK"})
Relationships connect two nodes and represent how entities are related:
PURCHASED, LIVES_IN, MANAGES)(Alice)-[:PURCHASED {date: "2024-01-15", quantity: 1}]->(Laptop)
(Alice)-[:LIVES_IN {since: 2018}]->(London)
Tip: Relationship types are written in UPPER_SNAKE_CASE by convention.
Properties are key-value pairs stored on nodes and relationships:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.