v1.0.0 — Built in Koder Lang

One database.
Seven models.

Store your data once, query it any way you need. Object, relational, document, graph, time-series, key-value, and vector — all in a single, unified engine.

Get Started Explore Models

Seven Data Models, One Engine

Every model operates over the same LSM-tree storage engine. An object can be queried as a row, projected as a document, traversed as a graph node, or searched as a vector.

Object-Oriented

Persist Koder Lang objects directly — no ORM, no impedance mismatch. Classes map to storage with inheritance, references, and polymorphism preserved.

zero-ORMinheritancepolymorphic queries

Relational

Full SQL-compatible interface with tables, joins, constraints, views, materialized views, CTEs, and window functions.

SQLjoinsACIDviews

Document

Schema-flexible JSON documents with nested field access, array operations, aggregation pipelines, and optional schema enforcement.

JSONschema-lesspipelines

Graph

First-class nodes and edges with BFS/DFS traversals, Dijkstra shortest path, PageRank, community detection, and cycle detection.

traversalsPageRankshortest path

Time-Series

Hypertables with automatic chunking, retention policies, continuous aggregates, downsampling, and InfluxDB line protocol compatibility.

hypertablesaggregatesretention

Key-Value

Rich data structures — lists, sets, sorted sets, hashes, streams — with TTL expiration, pub/sub messaging, and atomic operations.

structuresTTLpub/sub

Vector

HNSW index for approximate nearest neighbor search with cosine, euclidean, dot-product, and manhattan distance metrics. Hybrid search with metadata filters.

HNSWcosinehybrid search

Zero-ORM Object Persistence

Define a class in Koder Lang and persist it directly. No mapping files, no schema migrations, no boilerplate.

  • Classes map to storage naturally
  • Inheritance and references preserved
  • Polymorphic queries across class hierarchies
  • Lazy loading of object references
# Define a class and persist it — zero ORM
class User
  attr_accessor :name, :email, :age
  def initialize(name, email, age)
    @name = name
    @email = email
    @age = age
  end
end

user = User.new("Alice", "alice@koder.dev", 30)
db.object.store(user)

# Query with Koder Lang syntax
adults = db.object.query("User") { |u|
  u.age > 18 && u.email.end_with?("@koder.dev")
}

KQL — Unified Query Language

One query language that spans all seven models. SQL-compatible with extensions for graph traversals, time-series bucketing, and vector search.

  • SQL-compatible for relational queries
  • TRAVERSE for graph traversals
  • TIME_BUCKET for time-series aggregation
  • SIMILAR_TO for vector search
-- Relational
SELECT name, AVG(salary) OVER (PARTITION BY dept)
FROM employees WHERE active = true;

-- Graph traversal
TRAVERSE OUTBOUND 'alice' EDGE follows MAX 3
WHERE age > 25 RETURN name;

-- Time-series bucketing
TIME_BUCKET metrics INTERVAL 3600
AGGREGATE avg_cpu = AVG(cpu)
GROUP BY host FILL zero;

-- Vector similarity search
SELECT * FROM embeddings
SIMILAR_TO [0.1, 0.2, 0.3] KNN 10;

HTTP API + Real-Time

Full REST API for all models, plus WebSocket for live queries and change data capture. GraphQL auto-generated from your schema.

  • REST endpoints for every model
  • WebSocket live queries and CDC
  • GraphQL with auto-generated schema
  • InfluxDB line protocol for time-series
# Insert a document
curl -X POST https://kdb.koder.dev/api/v1/\
collections/posts/documents \
  -H 'Content-Type: application/json' \
  -d '{"title":"Hello","body":"World"}'

# Vector search
curl -X POST https://kdb.koder.dev/api/v1/\
vectors/embeddings/search \
  -d '{"vector":[0.1,0.2,0.3],"k":10}'

# Live query via WebSocket
{"type":"live",
 "query":"SELECT * FROM users"}

Built for Production

Every feature you need from a modern database, designed from the ground up.

LSM-Tree Storage

MemTable, WAL, SSTables with bloom filters, leveled compaction. Optimized for both reads and writes.

ACID Transactions

Serializable isolation with MVCC. Deadlock detection, savepoints, and two-phase commit for distributed transactions.

Multiple Indexes

B-tree, Hash, R-tree (geospatial), HNSW (vector). Automatic index selection by the query planner.

Distributed

Raft consensus for leader election and log replication. Consistent hashing with virtual nodes for sharding.

🔒
Security

JWT authentication, API keys, RBAC, row-level security policies. Encryption at rest and in transit.

Real-Time

Live queries, change data capture, WebSocket streaming, and pub/sub messaging built into the core.

💾
Backup & Recovery

Full and incremental backups with zstd compression. Point-in-time recovery via WAL replay.

📈
Monitoring

Prometheus-compatible metrics, slow query log, audit logging, and health checks out of the box.

💻
Server-Side Scripting

Stored procedures, triggers, and scheduled tasks written in Koder Lang, executing inside the database.

📦
Embeddable

Use as a standalone server or embed directly into your Koder Lang application as a library. Zero external dependencies.

🌐
Multi-Protocol

HTTP/REST, WebSocket, GraphQL, and wire protocol. InfluxDB line protocol for time-series ingestion.

🛠
Admin Dashboard

Built-in web UI with query editor, data browser, graph visualizer, and real-time statistics.

Architecture

Clean layered design where each component does one thing well.

Clients
CLI (kkdb) · HTTP/REST · WebSocket · GraphQL · Desktop · Mobile
KQL Query Engine
Lexer → Parser → Planner → Executor
Data Models
Object · Relational · Document · Graph · Time-Series · Key-Value · Vector
Transaction Manager
MVCC · Lock Manager · 2PC · Savepoints · Deadlock Detection
Index Engine
B-tree · Hash · R-tree · GIN · HNSW · BRIN
Storage Engine (LSM-tree)
MemTable → WAL → SSTable → Compaction · Bloom Filter · Compression
Replication
Raft Consensus · Consistent Hashing · Geo-Partitioning

How It Compares

Koder KDB combines the best features from 25+ open-source databases.

Feature Koder KDB PostgreSQL MongoDB Neo4j Redis InfluxDB
Relational
DocumentPartial
Graph
Time-SeriesExtension
Key-Value
Vector SearchExtensionAtlas
Object-Oriented
Live QueriesLISTENStreamsPub/Sub
Embeddable
GraphQL API

Ready to simplify your data layer?

One database. Seven models. Zero compromises.

Download v1.0.0 View Source