Database Reference
In-Depth Information
Note
To be semantically correct, the friendship relationship should be bidirectional, but Neo4j's
graphs are directed, which means that each relationship must have well-defined start and
end nodes. Bidirectional relationships in Neo4j can be modeled with two separate relation-
ships, one in each direction. For simplicity, we've modeled friendships as single, directed
relationships. As you'll see in later chapters, this will not affect our querying capabilities
inNeo4j,because relationships canbefollowed ineither direction, whichwill simplify our
model significantly.
Okay,youhaveafewusers,representedasboxes,whoarefriendsinthesocialnetwork.To
Figure 3.3. Richer model with a
name
property assigned to each user
Figure 3.3
finally looks like a proper social network. But your goal is to build a social net-
work of movie lovers, so the next step is to add a few movies to the model.