Solutions Architect Competitive Briefing
MongoDB vs. CockroachDB, ScyllaDB, EDB Postgres, and DynamoDB — architecture, transactions, scaling, and positioning.
Scroll or press ↓ to begin
5-way philosophy comparison
4 deep dives with code & diagrams
Cross-database comparison table
When to compete, when to concede
General-purpose document database. Flexible schema, rich querying, multi-document ACID, horizontal scaling via sharding. Tunable consistency.
Geo-distributed SQL. Serializable ACID everywhere. PostgreSQL wire protocol. Raft consensus. Designed for global consistency above all else.
Raw throughput engine. Shard-per-core architecture. LSM-tree storage. Cassandra-compatible API. Lightweight Transactions only.
Enterprise PostgreSQL. Relational + JSONB. Rich extension ecosystem (PostGIS, Citus). Oracle migration path. MVCC concurrency.
Serverless key-value. Single-digit ms latency at any scale. Access-pattern-driven design. 20 GSI limit. AWS-only.
At-a-glance summary across five architectural dimensions (hover for scores).
| Database | Flex | Cons | Perf | Scale | Eco |
|---|---|---|---|---|---|
| MongoDB | 9 | 7 | 8 | 8.5 | 9 |
| CockroachDB | 4 | 10 | 5 | 7 | 5 |
| ScyllaDB | 3 | 5 | 9.5 | 8 | 4 |
| EDB Postgres | 5 | 8 | 6 | 4 | 9 |
| DynamoDB | 5 | 6 | 7.5 | 8 | 5 |
Scores are directional estimates based on architecture, not absolute benchmarks. Use the head-to-head slides for nuance.
Head to Head
Flexible document model with tunable consistency vs. geo-distributed SQL with serializable ACID everywhere.
Hover over any component to learn more
Model: Document (BSON). Flexible schema. Embedded objects & arrays are first-class.
Transactions: Multi-document ACID. Tunable read/write concern per operation. Snapshot isolation.
Scaling: Sharding via mongos router. Shard key selection is critical. Live resharding available.
Model: Relational (SQL). Strict schema. PostgreSQL wire-compatible. JSONB column type for semi-structured.
Transactions: Serializable ACID by default (strongest level). Automatic retry on contention. Raft consensus for distributed writes.
Scaling: Automatic range splitting. Data redistributed as nodes are added. Geo-partitioning is a core feature.
MongoDB's rich document model vs. CockroachDB's relational approach — how they handle the same e-commerce order.
// One document = one atomic unit db.orders.insertOne({ customer: "alice", items: [ { sku: "BOOT-42", qty: 1, price: 129.99 }, { sku: "SOCK-M", qty: 3, price: 12.99 } ], shipping: { method: "express", addr: {...} }, total: 168.96 })
Entire order is one document. No joins. Atomic by default.
-- 3 tables, foreign keys, JOINs required INSERT INTO orders (customer, total) VALUES ('alice', 168.96); INSERT INTO order_items (order_id, sku, qty, price) VALUES (1, 'BOOT-42', 1, 129.99), (1, 'SOCK-M', 3, 12.99); INSERT INTO shipping (order_id, method) VALUES (1, 'express');
3 tables, 3 inserts, requires a transaction wrapper.
giftWrap field in MongoDB? Just add it. In CockroachDB? ALTER TABLE, migration scripts, deployment coordination. Every schema change is a production event.
Head to Head
General-purpose document database vs. C++ shard-per-core throughput engine built for known access patterns.
Hover over any component to learn more
Storage: WiredTiger (B-Tree). Balanced read/write performance. Compression.
Transactions: Multi-document ACID. Snapshot isolation. Full rollback support.
Indexing: Unlimited secondary indexes. Compound, multikey, text, vector, geospatial, wildcard. Rich ad-hoc querying.
Storage: LSM-Tree. Write-optimized. Shard-per-core — each CPU core owns its data slice. Zero contention.
Transactions: Lightweight Transactions only (compare-and-set via Paxos). No multi-row ACID. Significant LWT performance penalty.
Indexing: Primary key is the index. Secondary indexes are "materialized views." New query pattern = new table design.
ScyllaDB requires you to know every query upfront. New query pattern? New denormalized table.
// Query any field, any time db.events.find({ userId: "u_123", type: "click", timestamp: { $gte: ISODate("2025-01-01") } }).sort({ timestamp: -1 }) // New requirement? Just add an index: db.events.createIndex({ type: 1, timestamp: -1 })
-- Table designed for ONE access pattern CREATE TABLE events_by_user ( user_id text, timestamp timestamp, type text, PRIMARY KEY (user_id, timestamp) ); -- Need by type? NEW TABLE: CREATE TABLE events_by_type ( type text, timestamp timestamp, user_id text, PRIMARY KEY (type, timestamp) );
Head to Head
Document-native from storage to query language vs. relational database with JSONB columns bolted on.
Hover over any component to learn more
Schema: Flexible by default. Optional JSON Schema validation. No DDL for schema changes.
BSON: Binary JSON with rich types (Decimal128, Date, ObjectId, Binary). Document is the atomic unit.
Scaling: Native horizontal sharding. Designed for distributed from day one.
Schema: Strict DDL. Schema changes require ALTER TABLE. Migration tooling needed.
JSONB: Binary JSON stored in a column. GIN indexes for querying. But you still define relational tables — JSONB is an add-on, not the native model.
Scaling: Primarily scale-up. Citus extension for sharding, but it's a bolt-on. Logical replication for read replicas.
$elemMatch, no $unwind, and no change streams. EDB Docs →
The same query — find orders with boots over $100 — shows why JSONB isn't a document model.
db.orders.find({
"items": {
$elemMatch: {
category: "boots",
price: { $gt: 100 }
}
}
})
Reads like the data structure. Works on embedded arrays natively.
SELECT * FROM orders WHERE EXISTS ( SELECT 1 FROM jsonb_array_elements( data->'items' ) AS item WHERE item->>'category' = 'boots' AND (item->>'price')::numeric > 100 );
Subquery + function call + type casting. Harder to read, write, and maintain.
Head to Head
Rich querying with multi-cloud freedom vs. AWS-only serverless key-value with access-pattern rigidity.
Hover over any component to learn more
Indexes: Unlimited secondary indexes. Create new indexes to support new queries without changing the data model.
Transactions: Session-based multi-document ACID. Cross-collection, cross-shard.
Platform: Multi-cloud (AWS, Azure, GCP). Full-text search, vector search, change streams — all built-in.
Indexes: Max 20 Global Secondary Indexes (GSIs). Each GSI is a separate table projection. New access pattern = new GSI or table restructuring.
Transactions: API-based (TransactWriteItems / TransactGetItems). Max 100 items per transaction. No session concept.
Platform: AWS-only. Full-text search requires OpenSearch. No built-in vector search. Streams exist but limited.
DynamoDB's serverless convenience comes with a hidden cost — absolute vendor dependency and ecosystem lock-in.
DynamoDB's data model (partition key + sort key + GSIs) is proprietary. Migration requires rewriting your data layer — not just moving data. No wire-compatible alternative exists.
Every access pattern burns a GSI. At 20 you're done. MongoDB has unlimited secondary indexes — create them on the fly without restructuring the data model.
Full-text search requires OpenSearch (separate service, separate bill). Vector search requires a 3rd-party service. MongoDB Atlas has both built-in.
Simple key-value workloads at any scale with zero ops. Serverless microservices on AWS Lambda. Session stores, feature flags, game leaderboards — simple patterns where the 20 GSI limit isn't a concern.
Atlas Serverless offers zero-ops with multi-cloud flexibility, unlimited indexes, rich querying, ACID transactions, and no vendor lock-in. Same convenience, more capability, more freedom.
How each database handles data growth — and where the pain points emerge.
secondaryPreferred for analytics. M10–M30 Atlas tier.PARTITION BY) for data locality. Hot ranges require careful primary key design to avoid sequential writes.→ EDB docs
| Capability | MongoDB | CockroachDB | ScyllaDB | EDB Postgres | DynamoDB |
|---|---|---|---|---|---|
| Data Model | Document (BSON) | Relational (SQL) | Wide-column (CQL) | Relational + JSONB | Key-Value / Document |
| Multi-doc ACID | ✓ Full | ✓ Serializable | ✗ LWT only | ✓ Full | △ 100 items max |
| Schema | Flexible | Strict DDL | Strict DDL | Strict DDL | Schemaless |
| Secondary indexes | Unlimited | Unlimited | Limited (MVs) | Unlimited | 20 GSIs max |
| Full-text search | ✓ Atlas Search | ✗ External | ✗ External | △ pg_trgm / FTS | ✗ OpenSearch |
| Vector search | ✓ $vectorSearch | ✗ None | ✗ None | △ pgvector | ✗ None |
| Change streams / CDC | ✓ Real-time | ✓ Changefeeds | △ CDC (experimental) | △ Logical replication | ✓ DynamoDB Streams |
| Horizontal scaling | ✓ Sharding | ✓ Auto range-split | ✓ Consistent hashing | △ Citus (add-on) | ✓ Auto (serverless) |
| Multi-cloud | AWS/Azure/GCP | AWS/Azure/GCP | AWS/Azure/GCP | AWS/Azure/GCP | AWS only |
| Geo-distribution | Global Clusters | Native geo-partitioning | △ Multi-DC replication | ✗ Read replicas only | △ Global Tables (eventual) |
| Client-side encryption | ✓ FLE / Queryable | ✗ None | ✗ None | ✗ None | ✗ Server-side only |
Sources: MongoDB · CockroachDB · ScyllaDB · EDB · DynamoDB
| Capability | MongoDB Atlas | CockroachDB | ScyllaDB | EDB Postgres | DynamoDB |
|---|---|---|---|---|---|
| SLA | 99.995% | 99.999% (Dedicated) | 99.99% (Cloud) | 99.95%+ | 99.999% (Global Tables) |
| Compliance | SOC2, HIPAA, PCI, ISO, FedRAMP | SOC2, HIPAA | SOC2 | SOC2, HIPAA, PCI | SOC2, HIPAA, PCI, FedRAMP |
| Backup | Continuous PITR | Incremental + PITR | Snapshot-based | pgBackRest / PITR | On-demand + PITR |
| Ops complexity | Managed — Atlas automates | Managed — auto-scaling | Self-managed requires tuning | DBA expertise needed | Serverless — zero ops |
Global serializable ACID is non-negotiable. Financial ledgers, payment systems, global inventory. Customer already uses PostgreSQL and needs distributed SQL.
Workload is partition-key lookups at massive throughput. Time-series ingestion, IoT telemetry, messaging backends. No complex querying or transactions needed.
Customer is migrating from Oracle and wants SQL compatibility. Extension ecosystem (PostGIS, TimescaleDB) is critical. Team has deep relational expertise.
All-in AWS with serverless architecture. Simple key-value access patterns. Team accepts vendor lock-in for zero-ops experience.
End of Briefing
Know each competitor's sweet spot. Compete on developer experience, platform breadth, and architectural simplicity.