AQL (ArangoDB 3.11)

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 AQL (ArangoDB 3.11) — released October 2023 · lifecycle current

Family AQL — 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 AQL (2014 — introduced with ArangoDB 1.4) · Optimized AQL engine (September 2016 — query optimizer rewrite with ArangoDB 3.0) · ArangoDB 3.11 (October 2023 — 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 AQL (ArangoDB 3.11); an unmarked link is the current reference for the language.

Landing page

Specification and reference

Tutorial

1 Assessment

This page assesses AQL 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 87.7/100 · Ecosystem coupling 75.4/100 · Engineering readiness 56.7/100

1.1 Core coupling

1.1.1 Type

  • ❌ NULL and absent values are not type-safe: A missing document, an absent edge, and a NULL property all reach an expression, and comparisons over them form a three-valued logic (T10)
  • ❌ A function’s signature does not state its effects: A user-defined function runs inside the server, and the query text shows the call, not what the body reads, mutates, or reaches out to (T12)
  • ❌ User-defined functions cross into JavaScript unchecked: A JS function is declared by name, and the engine does not check its body against the query’s expectations (T14)
  • ✅ The query is analysed before execution: ArangoDB’s query analysis rejects malformed expressions and constant-folded type mismatches at prepare time

1.1.2 Construction

  • ✅ Data-driven blocks compose without shared state: FOR, LET, sub-queries, and COLLECT build intermediate results inside the query
  • ✅ Graph traversal is a first-class clause: OUTBOUND, INBOUND, and depth ranges state a traversal in the query, not in host code
  • ⚠️ Views store queries server-side: A stored view is a dependency a reviewer must fetch from the deployment to read a query in full

1.1.3 Memory

  • ✅ The engine owns allocation: Query buffers, index pages, and traversal state are managed by the server, not by the query
  • ⚠️ Deep traversals can exhaust engine memory: An unbounded depth range over a dense graph can still fail the operation

1.1.4 Error

  • ✅ Syntax and analysis errors are caught at prepare time: Unknown collections, malformed expressions, and unparsable queries are reported before the query runs
  • ⚠️ Runtime failures depend on the data: A type mismatch on an untyped JSON field, a division by zero, and a unique-constraint violation surface only on the documents reached

1.1.5 Concurrency

  • ✅ Transactions group writes atomically: BEGIN, COMMIT, and ROLLBACK make a set of AQL writes commit or abort as one
  • ⚠️ Isolation is engine-specific: A write conflict raises an engine error the caller handles outside the query language

1.1.6 Platform

  • ❌ AQL runs only inside ArangoDB: The language is defined for one product, and no other engine implements it (P1)
  • ❌ AQL is a poor fit outside database work: General application logic, external I/O, and multi-pass algorithms are pushed to a host language (P4)
  • ⚠️ Editions split features: ArangoDB’s Enterprise line adds security, caching, and graph features the community edition lacks

1.1.7 Trade-offs (not coupling)

  • One language over three models: Documents, graphs, and key-value reads share AQL; the breadth is real, and each model’s idioms coexist in one syntax
  • NULL and missing keep optional data natural: The document model needs no placeholder, and three-valued comparisons become a cost every reader pays
  • User-defined functions extend the query: JavaScript functions buy expressiveness at the cost of an unchecked foreign boundary
  • Community edition versus Enterprise: The language’s core is open, and the features an enterprise query needs sit in the licensed edition

1.2 Ecosystem coupling

1.2.1 Performance

  • ✅ The optimizer chooses index and traversal strategies: explain() reports the plan, and optimizer hints steer it
  • ⚠️ Plan quality depends on the indexes and statistics: The same query is fast on an indexed collection and a scan on a bare one

1.2.2 Ecosystem

  • ❌ Tooling fragments by edition and driver: Drivers, the web console, and migration tools target ArangoDB’s editions at different support levels (Ec2)
  • ❌ The AQL ecosystem is niche: The library pool, hiring market, and third-party tooling are thinner than for SQL, Cypher, or Gremlin (Ec3)
  • ✅ The server is open source: ArangoDB ships under a community licence, and its source and documentation are public

1.2.3 Evolution

  • ✅ Releases are published with changelogs: ArangoDB’s release notes name each AQL change before it ships
  • ⚠️ AQL has no standards committee: The language moves on the vendor’s release schedule, and features arrive engine-first

1.2.4 Domain

  • ❌ Adopting AQL means adopting ArangoDB’s multi-model store: One language spans documents, graphs, and key-value collections, and its clauses assume that model (D1)
  • ✅ AQL is used to query stored document and graph data: FOR d IN users retrieves documents, and graph traversal clauses walk edges and paths
  • ⚠️ Graph semantics are new material for SQL readers: Traversal direction, depth ranges, and path objects extend the SQL-shaped surface

1.2.5 Learning

  • ✅ The SQL-shaped core transfers: FOR, FILTER, SORT, and COLLECT read as SELECT-FROM-WHERE to anyone with SQL experience
  • ⚠️ Sub-query scoping and LET semantics take practice: A newcomer must learn where a variable is bound and how nested data flows through a query

1.2.6 Syntax

  • ⚠️ JSON expressions sit inside SQL-style clauses: FOR-RETURN reads like SQL until an expression nests JSON objects, arrays, and ternary operators
  • ⚠️ Collection and field access lean on punctuation: Backtick-quoted collections, doc.field paths, and arrow traversal operators carry the structure
  • ✅ Queries read linearly: A clause list in order states the data flow, and a short query is legible without a schema at hand

1.2.7 Testing

  • ❌ No test harness ships with the language: Testing an AQL query requires a running ArangoDB deployment and a harness each project builds for itself (G1)
  • ❌ Schemaless collections move type faults to execution: An expression on untyped JSON fields fails only when a matching document is reached, so an untested path gives no evidence (G3)
  • ❌ No monotonic clock is published in the language: DATE_NOW() and NOW() read the wall clock, so elapsed-time tests depend on the server’s clock (G4)
  • ✅ explain() and profile report plans and timings: Inspecting a query’s plan and execution statistics is standard practice

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)
  • ❌ Untrusted documents enter queries untyped: Field types in schemaless collections are data, so an expression must re-check each type at every use (Q2)
  • ✅ Parameterised statements remove the injection surface: Bound parameters carry data out of band, so a value cannot become syntax

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 server stores and parses the query text; no compiled unit crosses a boundary.

1.3 Engineering readiness

1.3.1 Reproducibility

  • ✅ A query is a request text: The same query submitted to the same server version and dataset produces the same result, and there is no build artifact to reproduce (Y1)
  • ⚠️ Queries live beside the application that submits them: A deployment stores no manifest naming the server version the query was written against

1.3.2 Supply chain

  • ❌ Published drivers carry no signed provenance by default: A consumer must trust the package they install (Y3)
  • ✅ Drivers publish in registries with an ownership model: The arangojs npm package names its publisher, so there is no flat namespace to hijack (Y4)
  • ❌ No vulnerability advisory feed joins published drivers to known vulnerabilities at the package-version level: A consumer reads release notes to learn a driver is affected (Y16)

1.3.3 Observability

  • ❌ No stable tracing and metrics standard is part of the language: Observability is provided by the server and its drivers (Y5)
  • ❌ No structured logging is defined in the language: Diagnostics are server log entries with their own format (Y6)
  • ✅ Slow and failed queries are recorded by the server: The slow-query log and query trace name the query and its timing (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)
  • ❌ No fast in-editor analysis ships for AQL: Query syntax is checked when the query is submitted; editors have no incremental analyser for the language (Y8)
  • ❌ No source-level debugger ships with the language: Debugging is done through query plans, logs, and the web console (Y13)

1.3.5 Interop

  • ✅ User-defined functions call host-language code: JavaScript functions extend the engine without leaving the process (Y9)
  • ❌ The query runs only inside ArangoDB: There is no portable target outside that product (Y10)

1.3.6 Governance

  • ❌ Governance is ArangoDB Inc.-led: The language ships with the server, and the roadmap follows the vendor (Y11)
  • ✅ The AQL manual 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 manual (Y17)
  • ✅ The parser is open source: ArangoDB publishes its query parser in the server source, so third-party tools can parse AQL (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 the ArangoDB server: energy and time are the engine’s, not the query’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?

  • ✅ The manual and tutorial are public with many examples: current models write common AQL queries reliably, though traversal semantics need review.

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 — 0
T5 no generics language — 0
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 −5.7 (−20)
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 ✅ −15
P2 single-vendor but other uses context — 0
P3 legacy/discontinued platform context — 0
P4 poor domain fit context ✅ −8
Platform cost −6.6 (−23)

Core coupling score: 87.7/100 — 43 of the 350 inventory points are present, so the axis cost is 100 × 43 ÷ 350 = 12.3 and the score is 100 − 12.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 ✅ −8
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 −6.2 (−16)
Evolution V1 breaking changes language — 0
V2 frozen context — 0
V3 discontinued context — 0
V4 glacial standards context — 0
V5 silent default drift runtime — 0
V7 build-variant state space context — 0
Evolution cost 0
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 ✅ −8
G2 poor debugging context — 0
G3 runtime-only errors context ✅ −4
G4 no published monotonic clock runtime ✅ −4
Testing cost −6.2 (−16)
Security Q1 memory-unsafe language — 0
Q2 dynamic/weak typing risk language ✅ −8
Q3 known vulnerability/injection context ✅ −8
Q4 silent integer overflow language — 0
Security cost −6.2 (−16)

Ecosystem coupling score: 75.4/100 — 63 of the 256 inventory points are present, so the axis cost is 100 × 63 ÷ 256 = 24.6 and the score is 100 − 24.6. 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 ✅ −4
Y13 no bundled debugger context ✅ −8
Feedback cost −7.0 (−12)
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: 56.7/100 — 74 of the 171 inventory points are present, so the axis cost is 100 × 74 ÷ 171 = 43.3 and the score is 100 − 43.3. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

Verdict: AQL’s coupling is set by its host. The SQL-shaped surface transfers to anyone with SQL experience, query analysis catches malformed expressions before execution, and bound parameters close the injection surface a string-built query opens. What the language charges: NULL and absent values are not type-safe, user-defined JavaScript functions cross an unchecked boundary whose effects no signature states, the language runs only inside ArangoDB, and the ecosystem is niche. Main strengths: graph traversal as a first-class clause, one language across documents and graphs, and public plans through explain(). Main weaknesses: single-vendor governance with no conformance suite, thin test tooling around a language that needs a running server, and schemaless collections that move type faults to execution.


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]
Arangodb GmbH, “ArangoDB 3.11 Documentation: AQL.” https://docs.arangodb.com/stable/data-integration/reference/syntax/, 2023.