Datahike

active

by replikativ (Christian Weilbach and contributors) · since 2018 · also known as datahike.io

Open-source, durable Datalog database for Clojure with Datomic-style immutable history.

relationalgraphdatabase engineopen source (copyleft)growing

Overview

Datahike is an open-source Datalog database for Clojure and ClojureScript that began as a durable fork of DataScript and follows Datomic's model: immutable datoms, as-of and history queries, and a pull API. Its persistent indexes are stored through the konserve abstraction, so the same database can live in memory, on files, in S3, JDBC databases or the browser, and readers can query directly from storage. It is the main open-source alternative for teams who like Datomic's model but want source access, embedded use or ClojureScript support. Throughput and tooling are modest, and the ecosystem is almost entirely Clojure.

Strengths & trade-offs

Strengths

  • +Datomic-like immutable model with as-of and history queries, fully open source
  • +Pluggable storage from memory and files to S3, JDBC and IndexedDB
  • +Runs embedded in JVM apps or in the browser via ClojureScript

Trade-offs

  • −Single-writer design limits write throughput
  • −Small community; mostly Clojure-only tooling
  • −Pre-1.0 versioning

Great for

  • +Clojure apps wanting Datalog and history without Datomic
  • +Knowledge graphs and research data with provenance
  • +Embedded databases in ClojureScript apps

Think twice for

  • −High-write OLTP
  • −Non-Clojure teams

Capabilities

Native or official first-party support · 6 of 25 tracked

✓Transactions
✓Joins
✓Secondary indexes
✓In-memory
✓Durable persistence
✓Time travel
–Full-text search
–Vector search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–Compression
–Encryption at rest
–Role-based access
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong
Schema
Flexible
Architecture
Embedded, Client server
Query languages
Datalog, Pull API

Single writer per database; readers can scale by reading indexes from shared storage.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsClojure API, HTTP (datahike-server)
client languagesClojure, ClojureScript, Java

Alternatives to Datahike

Compare all→
DatomicRelational14.9

Immutable Datalog database from Nubank where every fact is timestamped and queries run in the app process.

datahike vs datomic →
XTDBRelational8.3

Bitemporal SQL database on object storage that keeps every version of every row.

datahike vs xtdb →
CozoDBGraph13.9

Embedded Datalog database blending relational, graph and vector queries; dormant since 2024.

datahike vs cozodb →
TerminusDBGraph21.0

Git-for-data document and knowledge-graph database with branches, diffs and time travel.

datahike vs terminusdb →
Apache AGEGraph20.2

PostgreSQL extension that adds openCypher graph queries alongside SQL.

datahike vs apache-age →
AgensGraphGraph8.2

PostgreSQL fork with a built-in property graph model, mixing SQL, openCypher and ISO GQL.

datahike vs agensgraph →

Datahike FAQ

What is Datahike?

Datahike is a relational database by replikativ (Christian Weilbach and contributors), first released in 2018. Datahike is an open-source Datalog database for Clojure and ClojureScript that began as a durable fork of DataScript and follows Datomic's model: immutable datoms, as-of and history queries, and a pull API. Its persistent indexes are stored through the konserve abstraction, so the same database can live in memory, on files, in S3, JDBC databases or the browser, and readers can query directly from storage. It is the main open-source alternative for teams who like Datomic's model but want source access, embedded use or ClojureScript support. Throughput and tooling are modest, and the ecosystem is almost entirely Clojure.

Is Datahike open source?

Yes. Datahike is open source. License: Eclipse Public License 1.0.

Does Datahike support ACID transactions?

Yes. Datahike supports full ACID transactions, with strong consistency.

Does Datahike scale horizontally?

Datahike does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run Datahike?

You can self-host it and embed it in your application.

What is Datahike best for?

Datahike is a strong fit for clojure apps wanting Datalog and history without Datomic; knowledge graphs and research data with provenance; and embedded databases in ClojureScript apps. Think twice for high-write OLTP.

What are the best alternatives to Datahike?

Common alternatives to Datahike include Datomic, XTDB, CozoDB, TerminusDB and Apache AGE. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Datahike?

Datahike ranks #374 of 844 databases on the WhichDB Score (5.8/100), and #120 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.