vs

DataScript vs XTDB

DataScript: Immutable in-memory database with Datomic-style Datalog queries for Clojure, ClojureScript and JavaScript. XTDB: Bitemporal SQL database on object storage that keeps every version of every row.

key differences

  • DataScript is primarily a graph database; XTDB is relational.
  • XTDB is built for larger datasets (≤ 10 TB) than DataScript (≤ 100 GB).
  • Horizontal scaling is none in DataScript and manual in XTDB.
  • Only DataScript has secondary indexes, in-memory.
  • Only XTDB has json, columnar storage, compression, time travel.
  • DataScript can run embedded in your application process.

choose datascript for

  • +Client-side application state for ClojureScript apps
  • +Local-first note-taking and outliner tools
  • +In-memory graph queries over modest datasets

best at · Embedded, Local-first, Knowledge graph

choose xtdb for

  • +Financial and insurance systems needing as-of reporting
  • +Audit trails with retroactive corrections
  • +Event-sourced systems wanting SQL over history

best at · OLTP, Event sourcing, Ledger

overview
Primary model
Graph
Relational
Also supports
Key-Value
Document, Columnar / OLAP
Type
Embedded library
Database engine
Status
Active
Active
Developer
Nikita Prokopov (tonsky)
JUXT Ltd
First release
2014
2019
Latest version
1.8.1 (Aug 15, 2026)
2.2.0 (Oct 21, 2026)
License
Open source (copyleft)Eclipse Public License 1.0
Open source (copyleft)Mozilla Public License 2.0
Free tier
✓
✓
popularity
WhichDB Score
14.4
8.3
Rank
#233
#328
GitHub stars
5.8K
3.1K
Stack Overflow questions
24
7
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Medium (≤ 10 TB)
Horizontal scaling
None
Manual
Multi-region
None
None
ACID
Full
Full
Consistency
Strong
Strong
Schema
Flexible
Flexible
Architecture
Embedded, In memory
Distributed, Shared storage
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
✓
—
Edge
—
—
Clouds
–
–
capabilities
Transactions
✓
✓
Joins
✓
✓
Secondary indexes
✓
—
Full-text search
—
—
Vector search
—
—
Geospatial
—
—
JSON
—
✓
Change data capture
—
—
Triggers
—
—
Stored procedures
—
—
Materialized views
—
—
TTL / expiry
—
—
Pub/Sub
—
—
Columnar storage
—
✓
In-memory
✓
—
Durable persistence
✓
✓
Compression
—
✓
Encryption at rest
—
—
Role-based access
—
—
Time travel
—
✓
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
Datalog, Pull API
SQL, XTQL
Client languages
Clojure, ClojureScript, JavaScript
Java, Kotlin, Clojure, Python, JavaScript, Go
Best for
Embedded, Local-first, Knowledge graph
OLTP, Event sourcing, Ledger, HTAP

DataScript vs XTDB: FAQ

What is the difference between DataScript and XTDB?

DataScript: Immutable in-memory database with Datomic-style Datalog queries for Clojure, ClojureScript and JavaScript. XTDB: Bitemporal SQL database on object storage that keeps every version of every row. DataScript is primarily a graph database; XTDB is relational. XTDB is built for larger datasets (≤ 10 TB) than DataScript (≤ 100 GB). Horizontal scaling is none in DataScript and manual in XTDB.

When should I choose DataScript over XTDB?

Choose DataScript for client-side application state for ClojureScript apps; local-first note-taking and outliner tools; and in-memory graph queries over modest datasets. Choose XTDB for financial and insurance systems needing as-of reporting; audit trails with retroactive corrections; and event-sourced systems wanting SQL over history.

Is DataScript or XTDB more popular?

DataScript ranks #233 on the WhichDB Score (14.4/100) and XTDB ranks #328 (8.3/100). Popularity is not fit: check the requirements that matter for your project.

Are DataScript and XTDB open source?

Yes. DataScript is open source. License: Eclipse Public License 1.0. Yes. XTDB is open source. License: Mozilla Public License 2.0.