The Quantum Field Database
I remember when I heard that light is both a "wave" and a "particle" (a photon). Wave-particle duality.
Well, it is not. Light, per quantum mechanics, is actually a single quantum field. "Wave" and "particle" are not two kinds of light. They are two measurement outcomes of one underlying reality. The field doesn't choose to be one or the other. The measurement apparatus determines what you observe. The field simply is.
Now, apply this thinking to a database.
So why is a database forced to be SQL, or RDF, or a property graph, or XBRL? Why do we build separate systems for each paradigm, store the same facts in different formats, and then struggle to keep them synchronized? The data doesn't choose to be relational or graph. We choose how to query it. The query paradigm is the measurement apparatus. The substrate should just be.
The Problem
The root cause is that SQL, RDF, LPG, and XBRL were each designed around a different "atomic" data model; a different set of assumptions about what data fundamentally is. SQL assumes relations. RDF assumes triples. Property graphs assume nodes with attached edges. XBRL assumes dimensional facts. Each model carries its own semantics: its own way of handling absence, identity, schema, and truth.
Because the semantics differ, transforming data between paradigms is not merely reformatting. It requires judgment calls. What does an absent SQL row mean in RDF; is it false, or just unknown? What does an owl:sameAs assertion in RDF mean in a SQL primary key; can two rows merge? How do you represent a graph path in a relational join? These are not syntax problems. They are semantic impedance mismatches, and they make the transformations lossy.
The only way to unify SQL, RDF, LPG, and XBRL is to reject all four as the primary data model and replace them with a deeper substrate from which all four can be derived without loss.
The Constraints
By constraining the substrate to a Herbrand model, a concept from mathematical logic dating to the 1930s, you make all paradigm transformations provably lossless. The constraints are:
- Closed World Assumption. If a fact is not in the database, it is false; not unknown, not irrelevant, but false. This aligns with SQL's implicit semantics, with Prolog's negation-as-failure, and with the reality that a database should know what it knows and know what it doesn't.
- Unique Name Assumption. Distinct identifiers denote distinct entities. alice and bob are different symbols, therefore they refer to different things. No owl:sameAs. No identity merging. Unambiguous.
- No NULLs. Every fact is a definite assertion. A fact is in the database or it isn't. There is no third state. NULL is not a value; it is a failure of the model, a meta-assertion about the absence of information that introduces three-valued logic and corrupts every operation it touches.
- No Duplicate Rows. The database is a set of facts, not a bag. A fact exists once. If you need to record that five units were shipped, you store shipped ("order_123", 5) with the count as an explicit value; not five identical rows. This aligns with RDF, with logic, and with mathematical set theory.
- Ground, Typed Facts. Every fact is a ground atom: a predicate applied to concrete constants. The constants are drawn from a well-defined universe with a proper type system; not the weak, conflated type system of SQL, but one where identifiers, names, numbers, dates, and structured values have clear, distinct semantics.
These are not arbitrary design decisions. They are the precise conditions under which Horn clause logic, the fragment of first-order logic that supports efficient, sound, and complete computation; guarantees a unique minimal model.
These ideas are not mine. Database pioneers C. J. Date and Hugh Darwen, point out in their book The Third Manifesto: Types, and the Relational Model and in The Herbrand Manifesto and by groups like Datom.World in their quest for a universal abstract syntax tree (AST).
What This Buys You
Under these constraints, the transformations between paradigms become syntactic, not semantic. You are not converting data from one meaning to another. You are reformatting the same facts. The same four ground atoms are simultaneously:
- A relational schema: tuples in parent, department, and salary relations, queryable with SQL.
- An RDF graph: triples queryable with SPARQL.
- A property graph: nodes with edges, traversable with Cypher or Gremlin or ISO GQL.
- An XBRL fact set: dimensional assertions about entities, concepts, periods, and fact values, generatable into instance documents.
None of these is the "real" representation. All of them are projections of the same underlying state. Converting between them is like changing coordinate systems; a change of basis, not a change of meaning.
The Hilbert Space
In quantum mechanics, the field lives in Hilbert space; a complete inner product space that provides the mathematical structure for superposition, measurement, and transformation. Different measurement modes (position, momentum, spin) are different bases for decomposing the same state. The transformations between bases (Fourier transforms, rotation operators) are unitary; lossless, information-preserving.
The database equivalent: a Herbrand model with n possible ground facts has 2ⁿ possible states. This state space is isomorphic to an n-dimensional Hilbert space. Each database state is a definite point in this space; a specific collection of true facts.
The measurement modes; SQL, RDF, graph, XBRL; are different bases for decomposing the same state. Under the Herbrand constraints, the transformations between them are unitary: no information is lost, no semantic judgment calls are required, no facts are corrupted.
The inner product measures information overlap between states. Complementarity; the principle that some observables cannot be simultaneously optimized; manifests as real engineering trade-offs: a storage layout optimized for relational joins degrades graph traversal performance, and vice versa. But at the level of the substrate, the state itself is definite and invariant. The uncertainty lives in the measurement, not in the data.
The Deeper Substrate
And so what is the deeper substrate? What is the data model underneath all four paradigms?
It is Datalog; function-free Prolog; also known as Horn logic.
Horn logic is the fragment of first-order logic where every rule has at most one conclusion. This restriction, which appears minor, is what guarantees everything:
- A unique minimal Herbrand model; there is exactly one intended interpretation, not a disjunction of possibilities.
- Decidable, efficient computation; satisfiability is P-complete, not undecidable. Bottom-up fixpoint computation terminates and produces the complete model.
- The expressive superset of all four paradigms: relational algebra (SQL's foundation) is Datalog without recursion. SPARQL basic graph patterns are Datalog rules over triples. Graph reachability is Datalog with recursive rules. XBRL calculation linkbases are Horn rules applied to dimensional facts.
Datalog computes the Herbrand model. Given a set of facts and rules, it derives everything that follows; the minimal Herbrand model, the complete set of true assertions. This is not search. It is construction. You build the answer from the bottom up, applying rules until nothing new can be derived.
The Engineering Specification
The Third Manifesto; the work of C.J. Date and Hugh Darwen on what the relational model should have been, freed from SQL's compromises' prescribes how to store and query a Herbrand model without corruption. Their requirements: relations are sets, not bags. No NULLs. Proper type systems. Named, unordered attributes. Clean separation of variables from values.
These requirements, which Date and Darwen derived from relational theory to eliminate what they call "accidental complexity," are identical to the Herbrand model constraints. This is not a coincidence. The Third Manifesto is the engineering specification for a Herbrand model database, discovered from the practitioner's side. Herbrand's theorem is the mathematical foundation, discovered from the logic side. They converge on the same architecture because they are solving the same problem: how to represent and transform structured knowledge without losing or corrupting it.
The Architecture
The architecture has three layers: Measurement layer, Query Engine, Substrate. Paradigm-specific syntax, formatting, and extensions are projected as needed (e.g. NULLs synthesized for SQL if needed, Open-world reasoning for RDF if needed, edge weights for graphs if needed, dimensional contexts for XBRL if needed)
- Measurement Layer:
- SQL tables
- RDF triples
- Graph traversal
- XBRL
- Query Engine Layer (Datalog/Horn rules)
- Bottom-up fixpoint computation
- Stratified negation (CWA)
- Tabling (termination guarenteed)
- All measurement modes translate queries here in this layer
- Substrate Layer (Herbrand Model)
- Set of ground atoms, CWA, UNA, No NULLs
- No duplicates, Typed constants, Integrity constraints
- This is the quantum field.
- Not relational. Not graph. Not semantic.
- A set of facts in first-order logic.
- Every measurement mode is a projection of this.
The Convergence
The fact that these constraints match the design choices of Datomic (immutable datoms with Datalog), TerminusDB (Prolog-based, schema-enforced), TypeDB (conceptual model with inferential querying), the semantics of SWI-Prolog (native Herbrand model), and the foundations of relational algebra (set-theoretic, logic-based) is not a coincidence. These are deliberate, conscious decisions.
They all converge on the same well-behaved fragment of logic because that fragment is where transformations are guaranteed to be lossless. Herbrand's theorem (1930) guarantees it mathematically. Date and Darwen's Third Manifesto (1995) prescribes it for engineering. Datalog (1977) implements it as computation. And the quantum field metaphor describes it as physics.
Four traditions. One answer. A set of ground facts, queried through different measurement apparatuses, with the guarantee that no measurement corrupts the state.
The field simply is.
Discrete Stable Typed Units of Information
On top of the deep substrate is a model and mechanism which provides discrete stable typed units of information readable by both machines and humans through lossless projections. This is not a database feature. This is a property of the knowledge itself and possible when that knowledge is represented correctly.
The information is self-contained, composable, projectable, verifiable. This is what information looks like when it's represented at the right level of abstraction. Not too high (natural language, which is ambiguous and not machine-processable). Not too low (bytes, which are not human-readable). At the Herbrand level: formal enough for machines, natural enough for humans, stable enough to be the foundation for every measurement mode.
Essence of Accounting
The de facto standard double entry bookkeeping model (1494) is a deterministic system. This model does not call for safely in processing and systems which are well behaved; well behaved systems are foundational and demanded. The discrete stable typed units of information are the "window" into the database for both machines and humans.
Even better if the substrate is immutable. Add only. Mark something as being deleted as of some point in time but don't remove it from the database. Very important in accounting systems.
Additional Information:

Comments
Post a Comment