MergenDB (v1.0.0 Production Release)
The Ultra-Compact, Zero-Dependency Embedded Columnar & Vector Database Engine for Python and Node.js
The v1.0.0 Milestone: AI-Native Analytical Evolution
MergenDB v1.0.0 marks a monumental milestone in embedded data engineering. Traditionally, developers have had to deploy separate databases for columnar analytics (e.g. DuckDB, ClickHouse) and separate engines for vector similarity search (e.g. Chroma, LanceDB, Pinecone). Furthermore, these engines rely on complex C++ compilation toolchains, LLVM, or massive multi-megabyte wheel packages.
MergenDB v1.0.0 eliminates this complexity entirely. It provides a single-file (.mgdb), zero-external-dependency columnar database that natively executes both ultra-fast analytical SQL (GROUP BY, JOIN, AGGREGATE) and AI-driven vector embedding similarity search in both Python and Node.js.
Key Breakthroughs in v1.0.0
- AI-Native
VECTORType & SIMD Math: Native storage and computing of float embeddings (128, 384, 768, 1536+ dimensions) with zero external libraries. SupportsCOSINE_SIMILARITY,L2_DISTANCE(Euclidean),DOT_PRODUCT, andMANHATTAN_DISTANCE. - Hybrid Relational + Vector Search: Execute high-performance hybrid queries that combine SQL metadata filters with vector nearest-neighbor search in sub-milliseconds.
- Sub-Second 100M+ Row Columnar Scans: Point lookups execute in < 100ms, and analytical scans achieve ~400M+ rows/second directly evaluating binary byte streams with zero-copy
mmap. - Selective Late Materialization: Only matching rows decode dictionary values (
decode_dict_indices), bypassing decompression of thousands of unneeded rows. - Lazy Metadata Initialization (
LazyBlockList): Instant table opening (0.0001s) on multi-million row tables by deferring block metadata instantiation until requested. - Fault-Tolerant Streaming Ingestion (> 5M rows/s): Robust parallel byte-range parser seamlessly processes ragged rows, escaped quotes, missing fields, null bytes (
\x00), and diverse encodings. - Strictly Bounded Memory (< 20 MB RAM): Data streams in configurable column blocks (1,024 to 65,536 rows). Peak memory never grows with database file size.
- Hierarchical Database Architecture: Manage databases, tables, and nested sub-tables (
database.table.subtable) with isolated namespaces. - Zero External Dependencies: Built purely on standard library primitives (
zlib,struct,mmap,json,sqlite3,http). - Strict Zero-Emoji Policy: Clean, professional interface built with deterministic status tags (
[+],[-],[*],[!]).
SDKs & Extensions
Comprehensive MergenQL & Usage Guide
1. Python: Embedded Analytics & Hybrid Vector Search
import mergendb
from mergendb import Schema, ColumnDef, DataType, Table
# 1. Define schema with relational attributes and an AI embedding vector
schema = Schema([
ColumnDef("doc_id", DataType.INT32),
ColumnDef("title", DataType.STRING),
ColumnDef("category", DataType.STRING),
ColumnDef("embedding", DataType.VECTOR)
])
table = Table.create("knowledge_base.mgdb", schema)
# 2. Insert records
table.insert([
{"doc_id": 1, "title": "Attention Is All You Need", "category": "AI", "embedding": [0.95, 0.1, 0.05]},
{"doc_id": 2, "title": "General Relativity", "category": "Physics", "embedding": [0.82, 0.2, 0.15]},
{"doc_id": 3, "title": "French Culinary Arts", "category": "Cooking", "embedding": [0.05, 0.9, 0.1]}
])
# 3. Hybrid Vector Search (Filter + Top-K Cosine Similarity)
results = table.vector_search(
column="embedding",
query_vector=[1.0, 0.0, 0.0],
top_k=2,
filter="category == 'AI'",
metric="cosine"
)
results.show()
2. Analytical SQL with Vector Functions
SELECT title, category, cosine_similarity(embedding, [1.0, 0.0, 0.0]) AS score
FROM knowledge_base
WHERE category = 'AI'
ORDER BY score DESC
LIMIT 5;
In Python:
res = mergendb.query("""
SELECT title, cosine_similarity(embedding, [1.0, 0.0, 0.0]) AS score
FROM knowledge_base
ORDER BY score DESC
LIMIT 3;
""")
res.show()
3. Node.js & TypeScript SDK
import { MergenDB } from 'mergendb';
const db = new MergenDB({ host: '127.0.0.1', port: 8765, autoStart: true });
const table = db.table('knowledge_base');
// Native top-K vector search
const matches = await table.vectorSearch('embedding', [1.0, 0.0, 0.0], {
topK: 2,
filter: "category = 'AI'",
metric: 'cosine'
});
for (const doc of matches) {
console.log(`[+] Document: ${doc.title} (Score: ${doc.score.toFixed(4)})`);
}
4. CLI Command-Line Reference
The unified mergendb CLI provides comprehensive table inspection, query execution, and ingestion:
# Display table schema, row count, compression ratio, and block metadata
mergendb info knowledge_base.mgdb
# Execute analytical SQL directly from the terminal
mergendb sql "SELECT title, score FROM knowledge_base.mgdb WHERE score > 0.8"
# High-speed streaming CSV import (> 5M rows/second)
mergendb import knowledge_base.mgdb data.csv --delimiter "," --parallel
# Stream table export to JSON or CSV
mergendb export knowledge_base.mgdb --format json --output docs.json
# Launch the headless HTTP server with the new purple Studio Web UI
mergendb server --port 8765 --ui
# Run hardware profiler and memory benchmark
mergendb benchmark
License
Distributed under the MIT License. See LICENSE for details.
Metadata
Release files for mergendb 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mergendb-1.0.0.tar.gz | 156.6 kB | Without provenance | Details for mergendb-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mergendb-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mergendb-1.0.0-py3-none-any.whl |
Total release size: 280.3 kB
Release files / mergendb-1.0.0.tar.gz
| Download URL | mergendb-1.0.0.tar.gz |
|---|---|
| Size | 156.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cf523735574c656ed31def4823a9dac371ba4f9dceb4010f435a1fdc71937e4
|
|
BLAKE2b-256 checksum How to use checksums |
32d51b521166669bbfdf4afe62fc6f3c2a15ae6d927603d49d5ccb1797f9418b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.7rc1
|
Release files / mergendb-1.0.0-py3-none-any.whl
| Download URL | mergendb-1.0.0-py3-none-any.whl |
|---|---|
| Size | 123.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
475009597ca3bd61810351a7e928a6483d09da48a2388596cd8c59f815b2daf2
|
|
BLAKE2b-256 checksum How to use checksums |
396393f5ccd713e68c1828a6d4da91a3c9f0a392fca40e23f9fa35b3accc45f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.7rc1
|
Security for mergendb 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.