Skip to content

What is Cypher?

Cypher is a declarative language for querying graphs of nodes and relationships, using readable patterns to describe which connections and data to retrieve.

Cypher is a declarative language for querying and changing data organized as graphs: you describe the result and the system works out how to get it. In a graph database built on the property graph model, people, accounts, or other objects are nodes connected by relationships; nodes and relationships can both carry information such as names or amounts. Cypher draws the shape of the connections to match with parentheses and arrows instead of requiring step-by-step instructions. For example, a query can return the names of the accounts linked to a person. The language was developed by Neo4j; openCypher publishes an open specification of it that other implementations also follow. The specification is evolving toward GQL, a separate standard for property graphs. Similar syntax does not guarantee that every query will run unchanged on other systems: check the language version and the features actually available before choosing a platform.

See also: Graph databaseThe database that stores nodes and relationships as a native structure: the storage technology a knowledge graph is often built on.

How to read a query

A query is a request for data. In the syntax of the openCypher 9 reference, the query MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN b.name finds a direct KNOWS relationship from one person to another and returns the second person's name. Parentheses mark nodes, the arrow shows direction, and the text in square brackets names the relationship type. MATCH describes what to find; RETURN specifies what to show. The reference also defines variable-length patterns for following connections across several hops.

Compact syntax does not prove a query is fast: check performance and results on the target system and data. To compare alternatives, run the same queries on each, timing them and checking the results.

An enterprise example

A bank can represent accounts, account holders, and shared devices as connected nodes. An analyst looks for accounts reachable from a flagged account through these connections, up to an agreed number of hops. Cypher can describe the requested pattern; the team must still check that the data is current and the connections carry the intended meaning. A path found this way is a lead to investigate, not proof of fraud. Before going live, the bank can check results against cases already verified and decide who may see the returned data.

Why it matters for decision makers

In an RFP, ask vendors for the supported language version (for example, Neo4j's Cypher 5 or Cypher 25, or openCypher 9), any proprietary extensions, and a test with your real queries. The openCypher Technology Compatibility Kit defines correct openCypher behavior as scenarios with expected results. Since it does not cover proprietary extensions, it cannot guarantee that every product feature is portable. Also ask which scenarios were run and against which version.

ISO/IEC 39075 defines GQL for property graphs; openCypher is gradually aligning with GQL but is not identical to it. For RDF data, represented as subject-predicate-object triples, the W3C standard query language is SPARQL.

Frequently asked questions

No. GQL is an ISO standard for property graphs; the openCypher specification is evolving toward GQL, but compatibility depends on the version and on which features each product implements.

No. Neo4j developed Cypher, but other products also implement openCypher, its open specification, and they may differ in the features they support.
  • Graph databaseThe database that stores nodes and relationships as a native structure: the storage technology a knowledge graph is often built on.
  • SPARQLThe W3C standard language for querying RDF data and knowledge graphs through triple pattern matching.
  • Knowledge graphA network representing company data as entities and relationships: customers, products, contracts and the links connecting them.
  • GraphRAGAn evolution of RAG that retrieves knowledge from a knowledge graph: the model reasons over entities and relationships, not text chunks.

See it in the universe

If it touches your company's data, getting that data in order is the first thing I do.

See Data Foundations

Or write to me.