This site only uses technical cookies required for it to work: no tracking, no profiling. Cookie Policy

Skip to content
All terms

What is Cypher?

The ASCII-art pattern query language for graph databases, born in Neo4j and now the openCypher standard.

Cypher is the declarative query language for property-graph graph databases, born in Neo4j in 2011 and built around an ASCII-art pattern syntax: nodes are written in round brackets, relationships as arrows showing direction, in a query like MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN b.name. The query visually describes the shape of the graph you want to find, as if sketching the relationship diagram by hand, which makes it readable even to people who do not write SQL every day. In 2015 Neo4j open sourced the specification as the openCypher project, now adopted by more than a dozen graph engines beyond Neo4j, and in 2024 that base fed into the ISO/IEC 39075 GQL standard, the first international standard for property graph query languages, developed by ISO/IEC JTC1 SC32 WG3. Anyone who already knows Cypher or openCypher is therefore close to already knowing GQL, since the new standard draws heavily on both.

Why it is not just "SQL for graphs"

The practical difference shows up in multi-hop traversal: in SQL a question like "find every path up to four hops from this customer" needs nested joins that degrade quickly as depth grows. In Cypher the same traversal is written by extending the bracketed pattern, (a)-[:KNOWS*1..4]->(b), and the engine executes it natively by following pointers between nodes instead of recomputing joins. It is the property-graph equivalent (nodes and edges carrying labels and key-value properties) of what SPARQL is for data modeled as RDF triples: both declare the shape of the graph being searched for rather than the path to reach it, but Cypher works on a property model while SPARQL works on subject-predicate-object, and the two are not interchangeable without transforming the underlying data model.

Enterprise example and why it matters

A financial institution modeling accounts, transactions and account holders as a knowledge graph uses Cypher for fraud detection queries like "find every account connected within three hops to an already flagged account, through shared holders or devices": in SQL that would be a chain of self-joins degrading with search depth, in Cypher it stays a single readable, fast query. For decision makers, the point is not syntactic elegance: a readable language cuts the time it takes for an analyst, not only a graph specialist, to write and run queries against a web of relationships that would otherwise stay accessible only to whoever wrote the schema, and convergence toward GQL lowers the risk of single-vendor lock-in.

Frequently asked questions

No. Cypher queries property graphs, where nodes and edges carry free-form key-value properties. Querying data modeled as RDF triples requires SPARQL, a different language built for a different data model.

Not anymore. Cypher started in Neo4j in 2011, but since 2015 openCypher has existed, adopted by more than ten different graph engines, and it fed into the ISO/IEC 39075 GQL standard in 2024.
  • Graph database · The database that stores nodes and relationships as a native structure: the storage technology a knowledge graph is often built on.
  • SPARQL · The W3C standard language for querying RDF data and knowledge graphs through triple pattern matching.
  • Knowledge graph · A network representing company data as entities and relationships: customers, products, contracts and the links connecting them.
  • GraphRAG · An evolution of RAG that retrieves knowledge from a knowledge graph: the model reasons over entities and relationships, not text chunks.

A term that hits close to home? Let's talk.

CONTACT ME