In this article we will discuss about similarities and differences between MongoDB and Cassandra.
1. MongoDB :
MongoDB is a cross-platform document-oriented database program. It is an open-source document database, which stores the data in the form of key-value pairs.
Supported Languages : C++, Go, JavaScript, Python.
2. Cassandra :
Cassandra is a free and open-source, distributed, wide column store, NoSQL database management system. Which is used to handle large amounts of data.
Supported Languages : Java
Similarities :
- MongoDB and Cassandra used TCP/IP Protocol to transfer/receive the data through a network.
- Locks are available in Both.
- Both will support Linux OS, Mac – OS and Windows
- Both will store the data in disc.
- MongoDB and Cassandra are open sourced(Freely available to all)
- Both are scalable
Difference between MongoDB and Cassandra :
Cassandra | MongoDB |
Cassandra was developed by Apache Software foundation. | MongoDB was developed by MongoDB Inc. |
Cassandra can be written only in Java language. | MongoDB is written in C++, Go, JavaScript, Python languages. |
It will provide Local Transactions. | It will not provide Local Transactions. |
Triggers are available. | Triggers are not available. |
Data is replicated by using Multi-Master for Replication Factor. | Data is replicated by using Master-Slave for Replication Factor. |
Cassandra will not support Secondary Indexes. | MongoDB Supports Secondary Indexes. |
It is linearly scalable. | It is not linearly scalable. |
It stores large dataset. | It can’t store large datasets. |
Node failure may occur in Cassandra. | Node failure never occurs in Cassandra. |
Cassandra gives better throughput than MongoDB. | Less throughput than Cassandra. |
Cassandra support JSON data format. | MongoDB supports both JSON and BSON data formats. |
Data protection is upto 80%. | Data protection is upto 70%. |