Like every database query language, there are a few operative words that have an important meaning in the composition of every query. It's useful for you to know these since you will be using them to compose your specific queries on your specific datasets.
With these simple keywords, you should be able to start forming your first Cypher queries. After all, it's a bit like ASCII art, a structure similar to the one shown in the following diagram:
This is very easily described in Cypher as:
(a:Person {name:"Rik")–[:OWNS]–>(b:Device {brand:"LIFX"})
All we need to do to make this a proper Cypher statement is to wrap it in MATCH
and RETURN
statements:
Match (a:Person {name:"Rik")–[r:OWNS]–>(b:Device {brand:"LIFX"}) return a,r,b;
This is just a simple example of how you would start using Cypher. More complex examples can of course be found elsewhere in this book. You can also find the complete Cypher Ref Card (online version at http://docs.neo4j.org/refcard/2.1/) included in the final pages of this book.
18.191.168.8