In this post, we are going to address some major differences between MongoDB and Apache’s Cassandra, two of the most popular open-source NoSQL database with many powerful features.

1. Quick introduction

  • Cassandra was built at Facebook then released as open source in 2008. It’s now being managed by The Apache Software Foundation.
  • MongoDB was built in 2007 by 10gen, which later renamed to MongoDB, Inc.  MongoDB, Inc. provides development of the software and sells their enterprise solution.

Before we come down to the differences, let take a look at some points both Cassandra and MongoDB have in common:

  • They are both NoSQL database.
  • No ACID compliance.
  • Both keep recent data in memory to improve performance.
  • Both data stores discourage joins and prefer denormalization.

2. Feature comparison between Cassandra and MongoDB

  Cassandra MongoDB
Primary database model Wide column store Document store
Supported operating systems BSD, Linux, OS X, Windows Linux, OS X, Solaris, Windows
Support of SQL SQL-like SELECT, DML and DDL statements (CQL) Read-only SQL queries via the MongoDB Connector for BI
Stored Procedure support No Javascript
Triggers support Yes No
Replication methods Selectable replication factor Master-slave replication
In-memory capabilities No Yes
Written language Java C++
Protocol CQL3 Custom binary (BSON)

3. Advantages

Cassandra:

  • Free of cost
  • Peer to peer structural design
  • Elasticity
  • Fault tolerance
  • Great Performer
  • Column based
  • Adjustable steadiness

MongoDB:

  • Scalability
  • Flexibility
  • User-friendly
  • No concept of rows and columns
  • No re-establishment of  indexing

4. Disadvantages

Cassandra:

  • No support to Data Integration
  • No streaming of globule values.
  • No cursor support,
  • Large outputs must be physically paged

MongoDB:

  • Memory is not expandable
  • Joins can be done only through multiple queries
  • No transactions can be done

5. When to use

MongoDB is best for workloads with:

  • Lots of highly unstructured data.
  • Evolving data requirements.
  • Loosely coupled objectives — the design may change by over time.

Cassandra is the best choice for use cases:

  • SQL-style data types.
  • Very fast write speeds.
  • Steep learning curve when switching from SQL.

In short, if you want a database that’s similar to RDBMS but offers more flexibility at the same time, choose Cassandra. If you need a higher degree of flexibility and are willing to learn something new, pick MongoDB.


Need a good GUI Tool for Cassandra? Try TablePlus. It’s is a modern, native GUI that allows you to simultaneously manage multiple databases such as MySQL, MariaDB, PostgreSQL, SQLite, Microsoft SQL Server, CockroachDB, Oracle, Cassandra… in a fast and easy way.


Download TablePlus for Mac.

Not on Mac? Download TablePlus for Windows.

On Linux? Download TablePlus for Linux

Need a quick edit on the go? Download TablePlus for iOS.

TablePlus GUI Tool Cassandra