Database Reference
In-Depth Information
Given its simplicity and expressiveness, Cypher is the best option for most graph queries,
but for very complex traversals or inserts of big data sets, you may want to use the Core
Java API and Traversal API. We covered the basics of the Core Java API in chapters 3 ,
4 , and 5 . For in-depth coverage of the Traversal API, see chapter 8 . In future versions of
Neo4j,youcanexpectCyphertobecomethemostefficientandfastestwaytointeractwith
Neo4j.
We've come to the end of the Cypher syntax section. You've learned how to perform pat-
tern matching in Cypher, how to filter out results, how to return not only nodes but other
graph entities directly, and how to order and limit returned result sets.
Our discussion sofar has been related to reading data from Neo4j. Inthe next section we'll
show you how to create, update, and delete graph data using Cypher.
6.3. Updating your graph with Cypher
From Neo4j version 1.7 on, you can use Cypher to run mutating operations against your
graph database to create, update, and delete nodes and relationships and their properties.
The syntax for mutating operations is very intuitive, so let's take a look at a few examples.
Note
CyphergraphmutatingoperationsarearelativelynewfeatureoftheNeo4jdatabase,sothe
syntax for mutation may be subject to significant changes in future releases. This topic is
basedontheNeo4jversion2.0Cyphersyntax.You'readvisedtoconsulttheNeo4jManual
for the latest syntax ( http://docs.neo4j.org/chunked/stable/query-write.html ) .
Let's start with creating nodes and relationships.
Search WWH ::




Custom Search