With a little help from my friends

Among the improvements that graph databases bring compared to relational databases is a usage typical for dating sites and recommendation sites (find the friend of a friend or contacts of your contacts).

To demonstrate this, we need a little more data in our graph. Let's consider this as a tree with three levels of Dude (a new Label). There are no identifiers here, thus no constraint, just a name property. We will use this notation dudeA1:Dude for the first (1) node of the first level, our starting point being (leBig:Dude). This dude will have three friends (on level B) called (dudeB1:Dude), (dudeB2:Dude), and (dudeB3:Dude), who will have four friends each on level C.

To create these nodes, a Cypher code ...

Get Learning Neo4j 3.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.