A property graph represents a domain as nodes, relationships, labels, and properties. Nodes represent entities; relationships connect adjacent nodes and carry semantic meaning. section 2.2.1 section 2.5
Model the domain with these building blocks:
- Use node labels to express roles such as Person or Organization, and store node values as key-value properties. section 2.2.1
- Use typed, directed relationships to express meaning; relationship properties can store values such as a starting date. section 2.2.1
- Represent graph structure in Cypher with parentheses for nodes and square brackets for relationships: (:Node)-[:RELATIONSHIP]-(). section 2.5
- Keep one directed relationship when direction adds no semantic value, rather than duplicating an undirected connection. section 2.2.1 section 2.5
Representing a Twitter network
Start with the questions or insights the analysis should support, then describe the domain. A Twitter model can include users following users, users publishing tweets, and users retweeting posts. These activities become graph structures that can later support pattern retrieval, aggregation, and network analysis. section 2.3 section 2.0
(:Person {name:"Tomaz"})<-[:WRITES_FOR {since:2020}]-(:Organization {name:"Manning Publications"})
Use the compact Cypher example to see labels, node properties, relationship type, direction, and a relationship property together. section 2.2.1
Graph modeling is iterative: decide whether domain values belong in properties or separate nodes, visualize the schema, and refine it as analysis needs become clearer. section 2.5

