Cypher (Neo4j 5.x / openCypher)

This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].

Snapshot Cypher (Neo4j 5.x / openCypher) — released November 2024 · lifecycle current

Family Cypher — shelf: Data and Science

The language’s primary object is a dataset or a numeric array, not a program loop. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.

Trajectory Cypher (2011 — first release with Neo4j 1.4) · openCypher (October 2015 — openCypher project launched) · Neo4j 5.x (November 2024 — assessed release)

Tags

Use — Data and statistics, Query

Paradigm — Declarative

Lifecycle — Current

Memory — Runtime-managed

Typing — Static, strong

Resources

The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to Cypher (Neo4j 5.x / openCypher); an unmarked link is the current reference for the language.

Landing page

Specification and reference

Tutorial

1 Assessment

This page assesses Cypher in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.

Core coupling 89.7/100 · Ecosystem coupling 84.8/100 · Engineering readiness 59.1/100

1.1 Core coupling

1.1.1 Type

  • ✅ Property types come from the graph schema: Node and relationship properties are typed when a schema is declared, and the planner rejects type mismatches before execution
  • ❌ No sum types: A property is a scalar, a list, or a map, and an alternative must be modelled with nullable properties or separate nodes (T4)
  • ❌ No generics: A query cannot be parameterised over a type, so reusable logic is copied or wrapped in a procedure (T5)
  • ❌ NULL is a value in every property type: Missing properties and optional matches produce NULL, and three-valued logic makes NULL = NULL unknown (T10)
  • ❌ A CALLed procedure may perform effects the signature does not state: The query text shows the call, but it does not show whether the procedure writes, reads files, or invokes external systems (T12)
  • ❌ User-defined procedures cross into the host runtime unchecked: A procedure is declared by signature, but the engine does not check its implementation against that signature (T14)

1.1.2 Construction

  • ✅ Pattern matching is declarative: (a)-[:KNOWS]->(b) states the shape of the result and leaves the traversal to the planner
  • ✅ Subqueries compose without shared state: CALL { ... } and UNWIND let a query build intermediate results without imperative sequencing
  • ⚠️ Triggers and transaction event handlers run implicitly: A write can fire code that is not visible in the query text

1.1.3 Memory

  • ✅ The graph engine owns allocation: Buffers, index pages, and transaction state are managed by the database, not by the query
  • ⚠️ Large pattern matches can exhaust engine memory: An unbounded variable-length path or a dense cartesian product can still exhaust the configured heap

1.1.4 Error

  • ✅ Syntax and type errors are caught at prepare time: Unknown labels, missing variables, and type mismatches are reported before the query runs
  • ⚠️ Runtime failures depend on the data: Division by zero, missing properties, and constraint violations surface only when the path is reached

1.1.5 Concurrency

  • ✅ Transactions group writes atomically: BEGIN, COMMIT, and ROLLBACK make a set of updates commit or abort as one
  • ⚠️ Isolation is engine-specific: READ COMMITTED is common, and write skew is possible unless the engine supports a stronger level

1.1.6 Platform

  • ✅ openCypher provides a shared core: Pattern matching, MATCH, WHERE, CREATE, and RETURN are portable across Neo4j, Memgraph, and Amazon Neptune
  • ⚠️ Vendor extensions diverge: Index hints, full-text search, and procedure libraries differ by engine
  • ❌ The language is a poor fit outside property-graph workloads: Arbitrary algorithms and general application logic are usually pushed to a host language or a procedure (P4)

1.1.7 Trade-offs (not coupling)

  • Schema optional versus schema required: A flexible graph model allows ad-hoc properties, but the lack of enforced schema moves type agreements into code
  • NULL for missing values: Using NULL to mean “not present” widens the value set and brings three-valued-logic costs
  • Procedures extend the language: Calling a procedure buys expressiveness at the cost of an unchecked foreign boundary
  • Vendor-specific Cypher may be worth the portability cost: Engine extensions buy performance and features; the loss of portability is a deliberate trade

1.2 Ecosystem coupling

1.2.1 Performance

  • ✅ Cost-based planners choose traversal strategies: The engine selects start nodes, index scans, and join orders without hand-tuning in the query
  • ⚠️ Plan quality depends on the engine and the schema: The same query can be fast on one graph database and slow on another

1.2.2 Ecosystem

  • ❌ Tooling fragments by vendor: Visualisers, migration tools, and drivers commonly target one engine’s dialect and procedure set (Ec2)
  • ✅ Multiple engines share the openCypher core: Neo4j, Memgraph, and Amazon Neptune keep the core portable
  • ⚠️ The talent pool is narrower than SQL’s: Graph query expertise is common in graph-native teams but less so in general data teams

1.2.3 Evolution

  • ❌ The openCypher standard moves slowly: New features often appear first as vendor extensions and wait for standardisation (V4)
  • ✅ The core pattern language is stable: Queries written to the openCypher core continue to run across releases

1.2.4 Domain

  • ❌ Adopting Cypher means adopting a property-graph store: The language is inseparable from the graph data model and the engine that runs it (D1)
  • ✅ Excellent fit for connected data: Nodes, relationships, and pattern matches map directly onto graph-shaped problems
  • ⚠️ Recursive or path-centric algorithms can be awkward: Some traversals read more naturally in a traversal language than in pattern-matching syntax
  • ✅ Cypher is used to query stored graph data: MATCH retrieves nodes and relationships, and CREATE manipulates the graph

1.2.5 Learning

  • ✅ Basic pattern queries are intuitive: (a)-[:KNOWS]->(b) is readable after a short introduction
  • ⚠️ Variable scoping and OPTIONAL MATCH semantics take practice: A newcomer must learn where a variable is bound and how NULL propagates

1.2.6 Syntax

  • ✅ ASCII-art patterns are compact: A relationship and its direction are visible at a glance
  • ⚠️ Complex queries grow long: Multiple patterns, subqueries, and aggregations can produce deeply indented text

1.2.7 Testing

  • ✅ EXPLAIN and PROFILE are standard practice: Engines report the chosen plan and estimated or actual costs
  • ✅ Constraints are executable invariants: Uniqueness, existence, and type constraints reject bad data at write time
  • ❌ No monotonic clock is published in the language: datetime() reads the wall clock, so elapsed-time tests depend on the session clock (G4)

1.2.8 Security

  • ❌ String-built queries are an injection surface: Concatenating untrusted input into a query text lets that input change the parse (Q3)
  • ✅ Parameterised statements remove the injection surface: Bound parameters carry data out of band, so a value cannot become syntax
  • ✅ Role-based access control limits data visibility: The engine grants or denies read and write access per label, type, and property

1.2.9 Delivery targets

What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.

Target Ships as Crosses a producer boundary Cross-release promise
stored program script no The database engine stores and parses the query text; no compiled unit crosses a boundary.

1.3 Engineering readiness

1.3.1 Reproducibility

  • ✅ A Cypher program is a query text: The same text submitted to the same engine version and dataset produces the same result (Y1)

1.3.2 Supply chain

  • ❌ Published drivers and extensions carry no signed provenance by default: A consumer must trust the package they install (Y3)
  • ✅ No package registry exists for Cypher modules: There is therefore no registry namespace to confuse or hijack (Y4)

1.3.3 Observability

  • ❌ No stable tracing and metrics standard is part of the language: Observability is provided by the engine and its drivers (Y5)
  • ❌ No structured logging is defined in the language: Diagnostics are engine log entries with their own format (Y6)
  • ✅ Failed queries leave a query log and a stack trace: The engine records the query text and the error location (Y15)

1.3.4 Feedback

  • ✅ The edit-test loop is a text submission: There is no compile step between editing a query and running it (Y7)
  • ✅ Editors and drivers provide fast syntax feedback: The query is parsed before it is executed (Y8)
  • ❌ No source-level debugger ships with the language: Debugging is done through query plans, logs, and engine tools (Y13)

1.3.5 Interop

  • ✅ User-defined procedures call host-language code: Java, Python, or other procedures extend the engine without leaving the process (Y9)
  • ❌ The query runs only inside a graph database engine: There is no portable target outside that context (Y10)

1.3.6 Governance

  • ❌ Governance is effectively Neo4j-led: openCypher provides a community specification, but the main implementation and roadmap follow Neo4j (Y11)
  • ✅ The openCypher specification is public: The language surface is documented and can be implemented by others (Y12)
  • ❌ No conformance suite exists: Independent implementations cannot run a shared test suite against the specification (Y17)
  • ✅ Parser implementations and the grammar are available: Third-party tools can parse Cypher without reverse engineering (Y19)

1.4 Profile

Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.

1.4.1 Energy and cost

What this axis asks: what does a running program cost in energy and time?

  • ⚠️ Runs inside a graph database engine: energy and time are the engine’s, not the program’s.

1.4.2 AI and agent readiness

What this axis asks: how well does a coding model and an agent work in this language?

  • ✅ A well-documented query language with many public examples: current models write common patterns reliably.

1.4.3 Safety certification

What this axis asks: is there a certified or standards-qualified path to a safety-critical system?

  • ⚠️ No certified or standards-qualified path for safety-critical systems.

1.5 Scoring detail

1.5.1 Core coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Type T1 dynamic no static check language — 0
T2 weak static language — 0
T3 dynamic/duck dispatch language — 0
T4 no sum types language ✅ −4
T5 no generics language ✅ −4
T6 no namespaces language — 0
T7 type erasure/reflection language — 0
T8 operator overloading language — 0
T9 inheritance required for polymorphism language — 0
T10 no null-safety language ✅ −8
T11 no module boundary language — 0
T12 no effect tracking language ✅ −8
T13 async/sync colouring language — 0
T14 unchecked foreign boundary language ✅ −4
T15 chars are encoding units language — 0
Type cost −8.0 (−28)
Construction C1 global mutable state by default language — 0
C2 no immutability by default language — 0
C3 constructors coupled to allocation language — 0
C4 no constructor/validation language — 0
C5 unpinned collection order language — 0
C6 aliasing by default language — 0
C7 undeclared control transfer language — 0
C8 no source-visible init order language — 0
Construction cost 0
Memory M1 manual deallocation runtime — 0
M2 GC non-deterministic pauses runtime — 0
M3 no RAII language — 0
M4 no ownership model language — 0
M5 uninitialized reads language — 0
M6 unchecked reinterpretation language — 0
Er6 uncatchable runtime fault language — 0
M7 reference cycles leak runtime — 0
Memory cost 0
Error Er1 no structured path language — 0
Er2 unchecked exceptions only language — 0
Er3 errors ignored/non-exhaustive language — 0
Er4 no composable result type language — 0
Er5 no isolation unit for a fault runtime — 0
Error cost 0
Concurrency K1 GIL/no parallel runtime — 0
K2 shared mutable state default language — 0
K3 manual sync no race detection runtime — 0
K4 no structured concurrency language — 0
K5 no primitives language — 0
K6 thread-per-task cost runtime — 0
Concurrency cost 0
Platform P1 cannot function outside one vendor/domain context — 0
P2 single-vendor but other uses context — 0
P3 legacy/discontinued platform context — 0
P4 poor domain fit context ✅ −8
Platform cost −2.3 (−8)

Core coupling score: 89.7/100 — 36 of the 350 inventory points are present, so the axis cost is 100 × 36 ÷ 350 = 10.3 and the score is 100 − 10.3. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.2 Ecosystem coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Performance R1 interpreted no AOT/JIT runtime — 0
R2 GC pauses runtime — 0
R3 JIT warmup runtime — 0
Performance cost 0
Ecosystem Ec1 no package manager context — 0
Ec2 fragmented tooling context ✅ −8
Ec3 small/niche/discontinued context — 0
Ec4 proprietary context — 0
Ec5 platform-locked tooling context — 0
Ec6 monoculture context — 0
Ec7 legacy burden context — 0
Ec8 unpromised binary boundary context — 0
Ec9 unpromised data boundary context — 0
Ecosystem cost −3.1 (−8)
Evolution V1 breaking changes language — 0
V2 frozen context — 0
V3 discontinued context — 0
V4 glacial standards context ✅ −4
V5 silent default drift runtime — 0
V7 build-variant state space context — 0
Evolution cost −1.6 (−4)
Domain D1 domain/vendor lock-in context ✅ −15
D3 framework forces architecture context — 0
Domain cost −5.9 (−15)
Learning L1 steep context — 0
L2 large surface/multi-paradigm context — 0
L3 sparse docs context — 0
Learning cost 0
Syntax S1 verbose language — 0
S2 inconsistent language — 0
S3 punctuation-heavy language — 0
Syntax cost 0
Testing G1 weak tooling context — 0
G2 poor debugging context — 0
G3 runtime-only errors context — 0
G4 no published monotonic clock runtime ✅ −4
Testing cost −1.6 (−4)
Security Q1 memory-unsafe language — 0
Q2 dynamic/weak typing risk language — 0
Q3 known vulnerability/injection context ✅ −8
Q4 silent integer overflow language — 0
Security cost −3.1 (−8)

Ecosystem coupling score: 84.8/100 — 39 of the 256 inventory points are present, so the axis cost is 100 × 39 ÷ 256 = 15.2 and the score is 100 − 15.2. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.3 Engineering readiness Dimensions

Dimension Mechanism Description Imposed by Present Weight
Reproducibility Y1 build not reproducible context — 0
Y2 dependencies not pinned context — 0
Y14 no toolchain version pin context — 0
Y18 no machine-read project contract context — 0
Reproducibility cost 0
Supply chain Y3 no signed provenance context ✅ −15
Y4 registry without namespacing context — 0
Y16 no advisory feed context ✅ −8
Supply chain cost −13.5 (−23)
Observability Y5 no stable tracing standard context ✅ −8
Y6 no structured logging context ✅ −4
Y15 no post-mortem diagnostics runtime — 0
Observability cost −7.0 (−12)
Feedback Y7 slow build context — 0
Y8 no fast in-editor analysis context — 0
Y13 no bundled debugger context ✅ −8
Feedback cost −4.7 (−8)
Interop Y9 no foreign-function interface language — 0
Y10 no portable target context ✅ −4
Interop cost −2.3 (−4)
Governance Y11 single-vendor governance context ✅ −15
Y12 closed specification context — 0
Y17 no conformance mechanism context ✅ −8
Y19 no published parser context — 0
Governance cost −13.5 (−23)

Engineering readiness score: 59.1/100 — 70 of the 171 inventory points are present, so the axis cost is 100 × 70 ÷ 171 = 40.9 and the score is 100 − 40.9. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

Verdict: Cypher’s design yields low language-imposed coupling for property-graph queries. The declarative pattern-matching model separates what a result is from how it is traversed, and the graph schema separates data structure from the queries that consume it. Main strengths: compact pattern syntax, portable openCypher core, and mature cost-based planners. Main weaknesses: no sum types or generics, NULL is not type-safe, tooling fragments by vendor, the standard moves slowly, and string-built queries remain an injection hazard unless parameters are used.


The formal development. The definitions, theorems, and proofs behind this page are published in:

All published papers

References

[1]
Y. Loth, “On the nature of coupling: All coupling as shared resource access.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925121.
[2]
Y. Loth, “Coupling as a consequence of cohesion: Decomposition, the coupling floor, and domain-imposed coupling.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925201.
[3]
Y. Loth, “On the nature of cohesion: Cohesion as correctness relative to a partitioning rule.” Zenodo, Jul. 2026. doi: 10.5281/zenodo.20492912.
[4]
openCypher Implementers Group, “OpenCypher: Cypher query language reference, version 9.” https://opencypher.org/resources/, 2017.