Skills2026年5月3日·1 分钟阅读

XTDB — Bitemporal Database with Immutable History

XTDB is an open-source bitemporal database that records both valid time and transaction time for every fact. Query your data as it was at any point in time, or as it was known at any point — with full SQL support.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
XTDB Bitemporal Database
通用 CLI 安装命令
npx tokrepo install 0b2dc663-46cb-11f1-9bc6-00163e2b0d79

Introduction

XTDB (formerly Crux) is a bitemporal database that tracks two independent time axes for every record: valid time (when a fact is true in the real world) and transaction time (when the database learned about it). This enables regulatory compliance queries, point-in-time auditing, and temporal corrections without data loss.

What XTDB Does

  • Stores every version of every record with both valid-time and transaction-time metadata
  • Supports SQL queries with temporal predicates (AS OF, BETWEEN, ALL TIME)
  • Provides immutable append-only storage where no data is ever deleted
  • Enables retroactive corrections by inserting facts with past valid-time ranges
  • Offers both document and columnar storage engines for different workload profiles

Architecture Overview

XTDB v2 uses Apache Arrow as its in-memory format and stores data in columnar pages on object storage (S3, local filesystem). The transaction log is append-only, and each transaction produces new immutable pages. Temporal indexes enable efficient range queries across both time dimensions. The SQL engine compiles queries into vectorized execution plans that push temporal predicates into the scan operators for early filtering.

Self-Hosting & Configuration

  • Run via Docker or embed as a JVM library in Clojure/Java/Kotlin applications
  • Configure storage backend: local filesystem, S3, or Azure Blob Storage
  • Set transaction log storage (Kafka or local) for durability guarantees
  • HTTP server exposes SQL endpoint on port 3000 by default
  • Tune memory allocation for the Arrow buffer pool based on query workload

Key Features

  • Bitemporal by default: every record automatically tracks two time dimensions
  • Immutable history enables full audit trails without custom event-sourcing
  • SQL interface with temporal extensions makes adoption straightforward
  • Columnar storage (Arrow-based) provides efficient analytical queries
  • Schema flexibility: define columns per table without rigid migrations

Comparison with Similar Tools

  • PostgreSQL + temporal tables — Manual setup with triggers; XTDB has native bitemporality
  • Datomic — Similar immutable model but closed-source and Clojure-only deployment
  • TimescaleDB — Optimized for time-series metrics; XTDB handles arbitrary bitemporal facts
  • EventStoreDB — Event sourcing without temporal queries; XTDB provides SQL over history
  • TerminusDB — Git-like versioning; XTDB models time as first-class temporal dimensions

FAQ

Q: What is bitemporality and why does it matter? A: It tracks when something was true (valid time) separately from when the database recorded it (transaction time). This is required for audit compliance and enables corrections to historical data without losing the record of what was previously believed.

Q: Can I delete data for GDPR compliance? A: XTDB supports eviction operations that physically remove specific records while preserving the rest of the timeline.

Q: Is XTDB suitable for OLTP workloads? A: It handles transactional writes well but is optimized for analytical and temporal queries. High-throughput OLTP may benefit from a complementary system.

Q: What happened to Crux? A: XTDB v2 is the successor to Crux, rebuilt with a columnar engine and SQL support while keeping the same bitemporal principles.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产