Immutable history
Every datom is append-only. Nothing is ever deleted or overwritten. Query any point in time. Undo becomes trivial. Audit trails are built-in.
DaoDB is a datom stream interpreter that materializes queryable indexes. Built on DaoStream , it observes flowing datoms—some ephemeral, some persistent—and selectively consumes them to create covered indexes optimized for Datalog queries.
Unlike traditional databases that own and manage data, DaoDB is an interpreter of datom streams. Datoms originate from DaoStream —a flow of five-element tuples [e a v t m] representing entity, attribute, value, time, and metadata. The underlying stream can be implemented as an ephemeral transport or as a persistent log (like Kafka). DaoDB observes this flow and stores datoms by materializing covered indexes from the datoms it chooses to consume. Every piece of data in DaoDB is a materialized index derived from the stream. These indexes are append-only and immutable, creating a complete history of all observed state changes. DaoDB doesn't just store current state—it materializes queryable views of all states that flowed through the stream , making time travel, audit trails, and undo fundamental capabilities.
Not all datoms in a stream need to be stored in DaoDB. DaoDB selectively consumes the datoms it needs to materialize its indexes, deciding what to store based on query patterns and retention policies. This allows different nodes to maintain different views of the same streams—some storing everything, others keeping only recent data or specific attributes.
The datom is a concept from Datomic —a five-tuple representing an atomic fact. DaoDB adopts this foundation but extends it. While Datomic uses [e a v t op] where op is a retraction flag, Datom.World uses [e a v t m] where m is a metadata entity ID.
t has no meaning outside its originating streamThis structure makes every fact self-describing and independently meaningful. You can query any datom without needing to understand the entire database schema. Schemas evolve naturally as new attributes are added—no migrations, no downtime, no breaking changes. Learn more about why the five-element tuple enables DaoDB's power through restriction.
DaoDB is fundamentally local-first. When isolated, each device maintains its own complete materialized index store with stream-local transaction IDs advancing monotonically. But when devices entangle into a synchronization group, something profound happens: one leader establishes event ordering, imposing a single monotonic sequence across the entangled streams. Each device holds only a partial view of the whole state. Together, all devices in the entanglement group collectively maintain the complete database state .
This is quantum unitarity in a distributed system: the total information is preserved across the system, but no single observer possesses the complete state. When streams entangle, the leader coordinates the monotonic sequence, but t values remain scoped to their streams—cross-stream causality is still determined via m metadata. Learn more about how DaoDB implements Relational Quantum Mechanics and why conflicts are wave function collapse.
Unlike cloud databases that force you to trust a central server, DaoDB keeps custody of your data locally. You choose which streams to expose and who can read them. Collaboration happens through shared streams, not by surrendering control to a third party. See how branching and CRDT merges preserve local history in collaborative applications.
Every datom is append-only. Nothing is ever deleted or overwritten. Query any point in time. Undo becomes trivial. Audit trails are built-in.
DaoDB syncs across devices using CRDTs and causal ordering. Conflicts resolve automatically. No central coordination needed.
Define schemas when you query, not when you write. Add new attributes without migrations. Multiple interpreters can view the same datoms differently.
As a stream interpreter, DaoDB transforms flowing datoms into queryable indexes. By storing datoms in covered indexes optimized for different query patterns, DaoDB enables you to ask questions: What entities have a specific attribute? What changed between two points in time? Which datoms share causal relationships? The same datom can appear in multiple indexes (EAVT, AEVT, AVET, VAET) to support efficient lookups from different perspectives.
DaoDB is inspired by Datomic but extends its ideas far beyond traditional database use cases. While Datomic pioneered datoms for application data, DaoDB applies the same principles to code as data —storing ASTs, execution traces, and compiler intermediate representations as queryable datom streams. This enables every optimization to become queryable and code itself to be treated as a living, temporal database.
DaoDB implements Datomic's syntax of Datalog —a declarative query language built on Horn clauses, fixed-point semantics, and guaranteed termination. Queries are expressed as EDN data structures, making them homoiconic (code as data) and composable. Learn more about what makes Datalog Datalog .
Because indexes are materialized from immutable streams, queries naturally support temporal access. Ask what the world looked like at any point in history. Track how entities evolved over time. Audit who changed what and when. DaoDB combines efficient datom representation with bytecode-like execution performance while preserving full semantic queryability.
DaoDB is just one interpreter among many. The same datom streams can be interpreted differently by other applications— DaoFlow renders them as reactive interfaces, Shibi interprets them as economic signals and value flows. DaoDB provides the database interpreter view : materializing indexes for structured Datalog queries over flowing facts. Learn how datoms flow as streams and why computation moves to where data lives .
See how Yin agents process DaoDB streams, or explore DaoFlow to visualize the data.