Datoms
Each fact consists of an entity, attribute, value, transaction, and an indication of whether the fact was added or retracted.
An embedded Datalog database for immutable database values.
VevDB stores attributed facts and produces immutable database snapshots through append-only transactions. Applications can query those snapshots declaratively and pass them around as ordinary values.
The database runs in-process, either in memory or durably with bundled SQLite. It does not require a separate transactor process, a Clojure runtime, or a database server.
VevDB follows Datomic’s data model and supports Datalog queries, pull expressions, entities, indexes, history, and hypothetical databases.
(require '[vev.core :as d])
(def conn (d/create-conn))
(d/transact conn
[{:db/id 1 :person/name "Ada"}
{:db/id 2 :person/name "Grace"}])
(d/q '[:find ?name
:where [?e :person/name ?name]]
(d/db conn))
Each fact consists of an entity, attribute, value, transaction, and an indication of whether the fact was added or retracted.
Transactions produce new database values. Existing snapshots remain valid and can be queried at any time.
Queries support inputs, predicates, aggregates, rules, negation, disjunction, pull expressions, and historical views.
Use an in-memory connection for transient data or a durable store backed internally by bundled SQLite.
EAVT, AEVT, AVET, and VAET indexes support entity access, reverse references, range scans, and historical queries.
The query engine and storage layer run inside the application as a native library, without a separate server process.
The command-line interface reads and writes durable stores without a server. EDN transactions and queries can be supplied inline or in files.
For embedded use, start with the C API or one of the language packages.
$ vevdb transact example.db transactions.edn
$ vevdb query example.db query.edn
| Language | Status | Package or documentation |
|---|---|---|
| C | Built in | C ABI guide |
| Kvist | Built in | Kvist API |
| Clojure | Available | vevdb/vev-clj |
| Java | Available | vevdb/vev-java |
| Odin | Available | vevdb/vev-odin |