MongoDB pioneered the document database, but its October 2018 relicensing to SSPL sent the ecosystem searching for alternatives. AWS built DocumentDB (proprietary, cloud-only). FerretDB built a protocol translator (open source, but AI-free). HeliosDB takes a different approach: wire-compatible MongoDB protocol, AI-native capabilities, full SQL engine, and Apache-2.0 license --- all in a single 60MB binary. Your mongosh connects unchanged. Your drivers work unchanged. But now you also get native vector search, natural language queries, intelligent indexing, and 13 other protocol adapters.


Quick Comparison

Feature MongoDB 7 HeliosDB
LicenseSSPL (restrictive)Apache-2.0 (permissive)
Wire protocolNative OP_MSGOP_MSG + OP_QUERY (wire-compatible)
Aggregation stages35+50+ (including $facet, $graphLookup, $setWindowFields)
ACID transactionsMulti-documentMulti-document with MVCC
Vector searchAtlas-only ($vectorSearch)Native HNSW + Product Quantization (self-hosted)
NL queriesNot availableBuilt-in natural language to query translation
Intelligent indexingAtlas Performance Advisor (paid)ML-driven auto-recommendation (built-in)
Schema optimizationManual validation rulesAI-powered schema analysis
Change streamsYesYes (with CDC adapter)
GridFSYesYes
AuthenticationSCRAM-SHA-256 / x.509SCRAM-SHA-256
SQL accessNot availableSame data via PostgreSQL wire protocol
Full-text search$text / Atlas SearchNative @@ operator with boolean, phrase, fuzzy
Time-travel queriesNot availableMVCC snapshots at any timestamp
Data branchingNot availableGit-like branching with merge
Encryption at restEncrypted Storage Engine (Enterprise)TDE (AES-256-GCM) + Zero-Knowledge
Deploymentmongod + mongos + config serversSingle 60MB binary
Minimum HA3 nodes (replica set)2 nodes (primary + replica)
Other protocolsMongoDB only14 protocols (PG, MySQL, Redis, Cassandra, etc.)
Anomaly detectionAtlas alerts (threshold)Built-in AI.ANOMALY (z-score + ML models)
Production costAtlas M30: $370/month$0 self-hosted / $5K-20K managed

The FerretDB Approach, Supercharged

FerretDB proved that translating MongoDB wire protocol to an underlying SQL engine is viable. HeliosDB takes that idea and adds everything FerretDB left out: AI, performance, and a complete feature set.

FerretDB Architecture:
+------------------+     +------------------+
| MongoDB Client   |---->|    FerretDB      |---> PostgreSQL / SQLite
| (mongosh, etc.)  |     | (protocol proxy) |     (external dependency)
+------------------+     +------------------+
  No vector search. No AI. No change streams.
  Limited aggregation. External DB required.


HeliosDB Architecture:
+------------------+     +---------------------------------------------+
| MongoDB Client   |---->|              HeliosDB Full                   |
| (mongosh, etc.)  |     |                                             |
+------------------+     |  MongoDB Protocol Adapter (12,366 LOC)      |
                         |    50+ aggregation stages                    |
                         |    SCRAM-SHA-256 auth                        |
                         |    Change streams + GridFS                   |
                         |    MongoDB -> SQL query translator           |
                         |                                             |
                         |  AI Engine                                   |
                         |    HNSW vector search + PQ                   |
                         |    NL2SQL translation                        |
                         |    Intelligent indexing                       |
                         |    Anomaly detection                         |
                         |                                             |
                         |  SQL Core Engine                             |
                         |    Cost-based optimizer                      |
                         |    MVCC + ACID transactions                  |
                         |    LSM storage (no external DB)              |
                         |    Vectorized execution                      |
                         +---------------------------------------------+
  Everything in one binary. No external dependencies.
Capability FerretDB HeliosDB
ApproachProtocol translator (proxy to external DB)Protocol translator + full AI database engine
External database requiredYes (PostgreSQL or SQLite)No (built-in LSM storage)
Aggregation stages~10 basic stages50+ stages
Change streamsNot availableYes (with CDC adapter)
GridFSPartialFull implementation
Vector searchNot availableNative HNSW + Product Quantization
NL queriesNot availableBuilt-in NL2SQL
Intelligent indexingManual PostgreSQL indexesML-driven auto-recommendation
Multi-protocolMongoDB only14 protocols simultaneously

AI-Native Features

HeliosDB is not just a MongoDB-compatible database. It is an AI-native data platform that happens to speak MongoDB protocol. Every AI feature works with data stored via MongoDB drivers.

Vector Search ($vectorSearch)

MongoDB Atlas offers vector search only in the cloud, only with Atlas Search, and with limited integration into the standard aggregation pipeline. HeliosDB provides native HNSW vector indexes with Product Quantization, available self-hosted, and fully integrated with every query path.

// MongoDB Atlas: $vectorSearch (cloud-only, requires Atlas)
db.products.aggregate([
    {
        $vectorSearch: {
            index: "vector_index",
            path: "embedding",
            queryVector: [0.12, -0.45, 0.89, /* ... */],
            numCandidates: 100,
            limit: 10
        }
    },
    { $project: { name: 1, score: { $meta: "vectorSearchScore" } } }
]);

// HeliosDB: same syntax, self-hosted, with SQL hybrid queries
db.products.aggregate([
    {
        $vectorSearch: {
            index: "vector_index",
            path: "embedding",
            queryVector: [0.12, -0.45, 0.89, /* ... */],
            numCandidates: 100,
            limit: 10
        }
    },
    { $match: { category: "electronics", price: { $lt: 500 } } },
    { $project: { name: 1, price: 1, score: { $meta: "vectorSearchScore" } } }
]);
-- Or query the same data via PostgreSQL protocol with SQL
SELECT name, price,
       embedding <-> '[0.12, -0.45, 0.89, ...]'::vector(384) AS distance
FROM products
WHERE category = 'electronics' AND price < 500
ORDER BY embedding <-> '[0.12, -0.45, 0.89, ...]'::vector(384)
LIMIT 10;

Natural Language Queries

Non-technical users can query HeliosDB in plain English. The NL2SQL engine translates natural language into optimized MongoDB queries or SQL, depending on the protocol in use.

// HeliosDB NL query via MongoDB protocol
db.runCommand({
    nlQuery: "Find the top 5 customers who spent the most last month"
});
// Translates to:
// db.orders.aggregate([
//     { $match: { date: { $gte: ISODate("2026-02-01"), $lt: ISODate("2026-03-01") } } },
//     { $group: { _id: "$customer_id", total: { $sum: "$amount" } } },
//     { $sort: { total: -1 } },
//     { $limit: 5 },
//     { $lookup: { from: "customers", localField: "_id", foreignField: "_id", as: "customer" } },
//     { $unwind: "$customer" },
//     { $project: { name: "$customer.name", total: 1 } }
// ])

Intelligent Indexing

MongoDB Atlas Performance Advisor requires a paid Atlas tier and provides suggestions you must manually apply. HeliosDB's ML-based indexing engine analyzes query patterns in real time and can automatically create, modify, or drop indexes based on actual workload.

// MongoDB Atlas: manual index management
db.orders.createIndex({ customer_id: 1, date: -1 });
// Hope you guessed right. Check Atlas Performance Advisor in a week.

// HeliosDB: AI-driven index recommendations
db.runCommand({ analyzeIndexes: "orders" });
// Returns:
// {
//     "recommendations": [
//         { "action": "create", "index": { "customer_id": 1, "date": -1 },
//           "reason": "Covers 78% of queries, estimated 4.2x speedup" },
//         { "action": "drop", "index": { "status": 1 },
//           "reason": "Used by <0.1% of queries, wastes 2.3GB" }
//     ]
// }

Schema Optimization

// HeliosDB: AI-powered schema analysis
db.runCommand({ analyzeSchema: "users" });
// Returns:
// {
//     "suggestions": [
//         { "field": "address", "issue": "Nested object queried in 45% of reads",
//           "suggestion": "Flatten to top-level fields for 3x query improvement" },
//         { "field": "tags", "issue": "Array with avg 47 elements",
//           "suggestion": "Consider separate collection with $lookup" },
//         { "field": "last_login", "issue": "95% of values are timestamps",
//           "suggestion": "Add TTL index, enable time-series optimization" }
//     ]
// }

Aggregation Pipeline: 50+ Stages

HeliosDB implements over 50 aggregation pipeline stages, exceeding MongoDB's own count. The MongoDB-to-SQL translator converts pipelines into optimized SQL with CTEs and window functions, leveraging HeliosDB's cost-based query optimizer for execution plans that MongoDB's B-tree engine cannot match on analytical workloads.

Stage MongoDB 7 HeliosDB FerretDB
$matchYesYesYes
$groupYesYesYes
$sortYesYesYes
$project / $addFieldsYesYesYes
$unwindYesYesYes
$lookup (joins)YesYesPartial
$facetYesYesNo
$graphLookupYesYesNo
$setWindowFieldsYesYesNo
$bucket / $bucketAutoYesYesNo
$merge / $outYesYesPartial
$unionWithYesYesNo
$replaceRoot / $replaceWithYesYesNo
$redactYesYesNo
$sampleYesYesNo
$countYesYesNo
$densifyYesYesNo
$fillYesYesNo
$vectorSearchAtlas-onlyYes (self-hosted)No
Total stages~3550+~10

Code Examples

Connecting with mongosh

# Connect to HeliosDB exactly like MongoDB
mongosh "mongodb://admin:password@heliosdb-host:27017/mydb"

# All standard commands work
mydb> db.users.insertMany([
    { name: "Alice", age: 30, dept: "Engineering", tags: ["admin", "dev"] },
    { name: "Bob", age: 25, dept: "Marketing", tags: ["viewer"] },
    { name: "Carol", age: 35, dept: "Engineering", tags: ["admin"] }
])

mydb> db.users.find({ dept: "Engineering" }).sort({ age: -1 })
[
    { _id: ObjectId("..."), name: "Carol", age: 35, dept: "Engineering", tags: ["admin"] },
    { _id: ObjectId("..."), name: "Alice", age: 30, dept: "Engineering", tags: ["admin", "dev"] }
]

Aggregation Pipeline

// Complex aggregation: multi-stage pipeline with $facet
db.orders.aggregate([
    { $match: { date: { $gte: ISODate("2026-01-01") } } },
    {
        $facet: {
            byDepartment: [
                { $group: { _id: "$department", revenue: { $sum: "$total" } } },
                { $sort: { revenue: -1 } }
            ],
            byMonth: [
                { $group: {
                    _id: { $dateToString: { format: "%Y-%m", date: "$date" } },
                    orders: { $sum: 1 },
                    revenue: { $sum: "$total" }
                }},
                { $sort: { "_id": 1 } }
            ],
            topCustomers: [
                { $group: { _id: "$customer_id", spent: { $sum: "$total" } } },
                { $sort: { spent: -1 } },
                { $limit: 10 },
                { $lookup: {
                    from: "customers",
                    localField: "_id",
                    foreignField: "_id",
                    as: "customer"
                }},
                { $unwind: "$customer" },
                { $project: { name: "$customer.name", spent: 1 } }
            ]
        }
    }
]);

Vector Search (RAG Pipeline)

// Store documents with embeddings via MongoDB protocol
db.knowledge_base.insertOne({
    title: "HeliosDB Architecture Guide",
    content: "HeliosDB uses an LSM-tree storage engine with MVCC...",
    embedding: [0.12, -0.33, 0.78, /* 384 dimensions */],
    metadata: { category: "docs", version: 3 }
});

// RAG retrieval: vector search + metadata filter
db.knowledge_base.aggregate([
    {
        $vectorSearch: {
            index: "embedding_index",
            path: "embedding",
            queryVector: [0.11, -0.32, 0.79, /* query embedding */],
            numCandidates: 100,
            limit: 5,
            filter: { "metadata.category": "docs" }
        }
    },
    { $project: {
        title: 1,
        content: 1,
        score: { $meta: "vectorSearchScore" }
    }}
]);

// Same data accessible via PostgreSQL for SQL analytics
// psql: SELECT title, content, embedding <-> $1 AS dist
//       FROM knowledge_base WHERE category = 'docs'
//       ORDER BY embedding <-> $1 LIMIT 5;

Multi-Document Transactions

// ACID transactions work exactly like MongoDB
const session = client.startSession();
session.startTransaction();

try {
    const accounts = db.collection("accounts");

    // Transfer $500 from Alice to Bob
    await accounts.updateOne(
        { name: "Alice" },
        { $inc: { balance: -500 } },
        { session }
    );
    await accounts.updateOne(
        { name: "Bob" },
        { $inc: { balance: 500 } },
        { session }
    );

    // Record the transfer
    await db.collection("transfers").insertOne(
        { from: "Alice", to: "Bob", amount: 500, date: new Date() },
        { session }
    );

    await session.commitTransaction();
} catch (error) {
    await session.abortTransaction();
} finally {
    session.endSession();
}

When to Choose Each

Choose MongoDB When

  • Mature ecosystem matters most --- MongoDB has 15+ years of drivers, tools, tutorials, and community. If your team knows MongoDB deeply and needs the broadest third-party integration, MongoDB is the safe bet.
  • MongoDB Atlas is acceptable --- If you are already on Atlas and comfortable with the pricing and vendor relationship, Atlas provides a polished managed experience with built-in monitoring, backups, and Atlas Search.
  • Sharded cluster at massive scale --- MongoDB's sharding implementation (config servers + mongos) is battle-tested at multi-terabyte scale with years of production hardening.
  • Client-side field-level encryption --- If you need CSFLE with automatic encryption/decryption in the driver, MongoDB has this today.
  • SSPL is acceptable for your use case --- If you are not a cloud provider and SSPL does not conflict with your legal requirements, MongoDB's licensing may not be a blocker.

Choose HeliosDB When

  • License compliance is required --- Apache-2.0 has no usage restrictions. Cloud providers, SaaS companies, embedded systems, and government agencies can use HeliosDB without legal review of SSPL implications.
  • AI/RAG is a core requirement --- Native HNSW vector search, NL2SQL, intelligent indexing, and anomaly detection are built in, not bolted on as a paid cloud add-on.
  • Self-hosted vector search --- MongoDB vector search requires Atlas (cloud-only). HeliosDB runs HNSW vector indexes on your own infrastructure.
  • Multi-protocol access --- Your team needs to access the same data via MongoDB drivers AND SQL tools. A data scientist uses psql while the app uses Mongoose.
  • Cost matters --- MongoDB Atlas M30 (minimum production) costs $370/month ($4,440/year). HeliosDB is $0 self-hosted with full features.
  • Time-travel and branching --- Query historical data at any timestamp, create isolated branches for testing.
  • Operational simplicity --- A single 60MB binary vs mongod + mongos + config servers.
  • Encryption requirements --- TDE encrypts everything at rest (not just Enterprise tier). Zero-Knowledge Encryption ensures even admins cannot read data.

Migration Path

Step 1: Connection String Change

// Before (MongoDB)
const uri = "mongodb://user:pass@mongodb-host:27017/mydb";

// After (HeliosDB) -- change the host, everything else stays the same
const uri = "mongodb://user:pass@heliosdb-host:27017/mydb";

Step 2: Data Migration

# Option A: mongodump/mongorestore (standard MongoDB tools)
mongodump --uri="mongodb://mongodb-host:27017/mydb" --out=/tmp/dump
mongorestore --uri="mongodb://heliosdb-host:27017/mydb" /tmp/dump

# Option B: Live migration with change streams
# Start syncing from MongoDB to HeliosDB, then cut over

Step 3: Verify

# Verify with mongosh
mongosh "mongodb://heliosdb-host:27017/mydb"

mydb> db.users.countDocuments()
42517

mydb> db.users.find({ status: "active" }).limit(5)
# Same results as MongoDB

mydb> db.orders.aggregate([
    { $group: { _id: "$status", count: { $sum: 1 } } }
])
# Same aggregation results

Step 4: Enable AI Features (Optional)

// Now add capabilities that MongoDB doesn't have

// Create vector index for semantic search
db.products.createIndex(
    { embedding: "vectorSearch" },
    { hnsw: { m: 16, efConstruction: 200 } }
);

// Use natural language queries
db.runCommand({ nlQuery: "Show me this week's top sellers" });

// Enable intelligent index recommendations
db.runCommand({ analyzeIndexes: "orders" });

// Access the same data via SQL
// psql -h heliosdb-host -p 5432 -d mydb
// SELECT * FROM orders WHERE total > 1000 ORDER BY date DESC;

Pricing Comparison

Tier MongoDB Atlas HeliosDB
Free tierM0: 512MB, shared, no vector searchUnlimited (Apache-2.0, all features)
DevelopmentM10: $57/month ($684/yr)$0 (self-hosted)
ProductionM30: $370/month ($4,440/yr)$0 (self-hosted)
Production + VectorsM30 + Atlas Search: ~$500/month$0 (vectors included)
EnterpriseM50+: $1,000+/month$0 (self-hosted)
Managed serviceAtlas metered pricing$5,000-$20,000/year (predictable)
Support$15,000+/year (Enterprise)Included in managed tier

Summary

Dimension MongoDB 7 FerretDB HeliosDB
LicenseSSPLApache-2.0Apache-2.0
Wire compatibilityNativeYes (proxy)Yes (built-in adapter)
Aggregation35+ stages~10 stages50+ stages
Vector searchAtlas-only (cloud)NoNative HNSW + PQ (self-hosted)
NL queriesNoNoBuilt-in NL2SQL
Intelligent indexingAtlas Advisor (paid)NoML-driven, built-in
SQL accessNoBackend-dependentYes (14 protocols)
Change streamsYesNoYes + CDC
TransactionsMulti-documentBackend-dependentMulti-document ACID + MVCC
Time-travelNoNoYes (MVCC snapshots)
EncryptionEnterprise onlyBackend-dependentTDE + ZKE (all editions)
DeploymentMulti-componentProxy + backendSingle 60MB binary
Best forEstablished MongoDB shopsLicense compliance (minimal)AI-native document workloads
Production cost$370+/month (Atlas)$0 + backend cost$0 self-hosted

MongoDB defined the document database category. FerretDB solved the licensing problem. HeliosDB solves both --- and adds the AI capabilities that the next generation of applications demands. Same connection string, same drivers, same mongosh. Plus native vector search, natural language queries, intelligent indexing, and 13 other protocol adapters. All under Apache-2.0, all in a single binary.

Ready to try HeliosDB?

Get started with HeliosDB in minutes. Open source, free to use.

Get Started Contact Sales