Database Reference
In-Depth Information
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 topic. You can also
indthecompleteCypherRefCard(onlineversionat
http://docs.neo4j.org/
refcard/2.1/
)includedintheinalpagesofthisbook.
The Cypher refcard
Cypher is the declarative query language for Neo4j, the world's leading
graph database.
The key principles and capabilities of Cypher are as follows:
• Cypher matches patterns of nodes and relationship in the graph,
to extract information or modify the data
• Cypherhastheconceptofidentiiers,whichdenotenamed,
bound elements and parameters
• Cypher can create, update, and remove nodes, relationships, labels,
and properties
• Cypher manages indexes and constraints
{value}
denotes either literals (for ad hoc Cypher queries)
or parameters, which is the best practice for applications.
Neo4j properties can be strings, numbers, Booleans, or
arrays. Cypher also supports maps and collections.
For your convenience, we included the online version of the Cypher
refcard
refcard
is published online under the Creative Commons Attribution-ShareAlike
3.0 Unported (CC BY-SA 3.0) license, details of which can be found at
http://