Book Image

Neo4j High Performance

By : Sonal Raj
Book Image

Neo4j High Performance

By: Sonal Raj

Overview of this book

Table of Contents (15 chapters)
Neo4j High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Cypher graph operations


Cypher is a whiteboard-friendly language. Like the data on which it is used, queries in Cypher follow a diagrammatic approach in their syntax. This helps to target the use of graph databases to a greater variety of audience including database admins, developers, corporate professionals, and even the common folk. Let's take a look at some Cypher queries before diving into the best practices and optimizations for Cypher.

The following pattern shown depicts three entities interrelated through a relationship denoting the NEEDS dependency. It is represented in the form of an ASCII art:

(A)-[:NEEDS]->(B)-[:NEEDS]->(C), (A)-[:NEEDS]->(C)

The previous statement is in the form of a path that links entity A to B, then B to C, and finally A to C. The directed relation is denoted with the -> operator. As it is evident, patterns denoted in Cypher are a realization of how graphs are represented on a whiteboard. It is worth noting that although a graph can be constructed...