NoSQL DB’s Comparisons

perfect — here’s a text-only, rows/columns comparison of the five NoSQL databases you asked about. no diagrams, just tables.

1) Overview & CAP posture

DatabasePrimary Data ModelCAP Lean (typical)Consistency (default)TunabilityTransactions
MongoDBDocument (BSON/JSON)CP by default; AP-ish if reading from secondariesStrong on primary; “majority” for committed reads/writesreadConcern/writeConcern, readPreferenceACID multi-document (incl. sharded)
CassandraWide-columnAP (high availability, partition tolerant)Eventual; per-op CL (e.g., LOCAL_QUORUM)Tunable CL for reads/writes, RFPer-row atomic; LWT (Paxos) for conditional updates
ElasticsearchIndexed documents (search)AP (NRT search, high availability)Primary→replica; eventual across replicasAcks, refresh interval, durability settingsPer-doc atomic only
CouchbaseDocument + Key/Value (memory-first)AP-leaning (durability/consistency tunable)KV strong per-key; queries NRT unless request_plusDurability levels, scan_consistencyDistributed ACID transactions
Neo4jProperty graphCP in core (leader/followers); AP-like reads on replicasStrong on core; eventual on read replicasCausal consistency APIs, topologyACID

CAP note: All are P-tolerant by design. “Lean” reflects common defaults when a partition occurs: you typically trade C or A, not both.


2) Internals & scaling

DatabaseReplication / ConsensusPartitioning / ScalingStorage / Index CoreQuery Interfaces
MongoDBReplica sets (PV1, Raft-like election); CSRS for metadataSharding: hashed / ranged / zone; balancerWiredTiger (B-Tree), secondary indexes; text/geoCRUD, Aggregation Pipeline, $lookup, text/geo, Change Streams
CassandraGossip membership; hints; Paxos for LWT; anti-entropy via Merkle treesConsistent-hash ring (token ranges); linear scale; multi-region active-activeLSM / SSTables; leveled/size-tiered compactionCQL (partition-key and clustering-key oriented)
ElasticsearchCluster coordination (Zen2, Raft-like); primary/replica shardsHash-based shards; routing by id/field; cross-cluster search/replicationLucene inverted index, doc values; translog; segment mergesFull-text DSL, filters, aggregations, geo (REST/HTTP)
CouchbasevBuckets + replicas; DCP change streams; XDCR for x-DC~1024 vBuckets hashed across nodes; multi-dimensional scaling by serviceCouchstore/Magma; GSI indexes; FTS serviceN1QL (SQL for JSON), KV API, FTS, Analytics, Eventing
Neo4jCore cluster uses Raft (leader/followers); read replicasFabric for multi-graph; replicas for read scaleNative graph store; schema indexes; optional Lucene for textCypher; procedures (APOC); GDS library APIs

3) Features, use cases & cautions

DatabaseNotable FeaturesTop Use CasesCautions / Pitfalls
MongoDBTime-series, TTL, schema validation, Client/Field-Level & Queryable Encryption, Atlas SearchCatalogs, user profiles, event logs, microservices backends, operational analyticsBad shard key → hot shards; scatter-gather on unsharded queries; oversized docs/arrays
CassandraMulti-region active-active, incremental repair, materialized views (with care)IoT/time-series, session stores, metrics, high-write feedsQuery-driven data modeling; no joins; LWT adds latency; wide partitions can hurt
ElasticsearchRelevance scoring, analyzers, ILM, CCR/CCS, observability ecosystemSearch, log analytics/observability, e-commerce search, SIEMNot an OLTP store; mapping & high cardinality fields can explode memory; refresh trade-offs
CouchbaseBuilt-in cache, sub-document ops, Sync Gateway (mobile), flexible services (KV/Query/FTS/Analytics)Low-latency KV & sessions, personalization, catalogs, mobile syncPick scan_consistency wisely; index sizing/placement matters; cross-service resource isolation
Neo4jGraph algorithms (PageRank, Community, Shortest Path), path traversals, APOCFraud detection, recommendations, knowledge graphs, network analysisGlobal write scale needs careful partitioning; hotspot relationships can bottleneck

How to pick quickly (text-only cheat sheet)

  • Need strong consistency + rich JSON + aggregations → MongoDB (CP).
  • Need planet-scale writes + tunable consistency → Cassandra (AP).
  • Need full-text search/analytics over logs → Elasticsearch (AP).
  • Need millisecond KV + SQL-for-JSON + caching → Couchbase (AP-leaning).
  • Need deep relationship queries/graph algorithms → Neo4j (CP core).

If you want this exported as a single HTML/CSV table, say “export HTML” or “export CSV” and I’ll generate the file immediately.

Leave a Reply

Discover more from My Daily Market Update

Subscribe now to keep reading and get access to the full archive.

Continue reading