Database Reference
In-Depth Information
Figure 4.2. Nodes and relationships to follow to find movies that John's friends like
To solve this problem, we'll split it into several steps. First, you'll find all of John's friends
by following the
IS_FRIEND_OF
relationships from the starting node. Next, you'll fol-
low the
HAS_SEEN
relationships from the nodes representing friends to find the movies
they've seen. The next listing shows the implementation of these two steps, again simply
using the Neo4j Core Java API.