O'Reilly logo

Learning Neo4j 3.x - Second Edition by Rik Van Bruggen, Jérôme Baton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Relations

To illustrate this paragraph, let's recreate the dataset with relations.

First, let's clear the graph:

MATCH (n:MERGE)DETACH DELETE n

Now, let's create some data with the following query:

CREATE (a:FIRST:MERGE {name:'a',propF1: 'AF1',propF2: 'AF2'}), (b:SECOND:MERGE {name:'b',propS1: 'BS1',propS2: 'BS2',propF2:'VALUE FROM SECOND'}), (c:THIRD:MERGE {name:'c',propT1: 'CT1',propT2: 'CT2',propT3: 'CT3', propF1:'VALUE OF THIRD'})CREATE (a)-[:A2B]->(b),(b)-[:B2B]->(b),(a)-[:A2C]->(c),(b)-[:B2C]->(c)

And check our small dataset with:

MATCH (n:MERGE)RETURN n

Our start graph is as follows:

 A graph well-named and well-oriented

We can now ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required