Cassandra is a partitioned row store db
Cassandra is a partitioned row store db.
Data looks like:
"Employees" : {
row1 : { "ID":1, "Last":"Cooper", "First":"James", "Age":32},
row2 : { "ID":2, "Last":"Bell", "First":"Lisa", "Age":57},
row3 : { "ID":3, "Last":"Young", "First":"Jospeh", "Age":45},
...
}
So it looks like there are columns in each row, however the number of columns in each row does not need to be the same.
So Cassandra looks like a two-dimensional key-value store.
It takes time to create the schema for a relational database
It takes time to convert the data into a format that can be entered into a relational database.
The data may not be 100% consistent or uniform to fit in a relational database.
It may be slow entering data into the relational database
It is not very efficient clustering databases for usage in many different locations
Database struggle with very big data sets
It is faster writing to Cassandra then writing to a relational database
Cassandra is designed to be written to on many different nodes
A complicated schema does not need to be created to write data to Cassandra
Cassandra is designed to be used for very big data sets
Cassandra has a flexible schema
Redis is an in memory database suited for small datasets which are rapidly changing - i.e. Redis is useful for real time analytics
Cassandra is more transactional and can cope with large data sets. Cassandra is slower than Redis.
Cassandra has better write scaleability
Cassandra has faster Read performance: Big O(1) time
Cassandra has more robust replication called Selectable Replication Factor. MongoDB supports Master Slave Replication.
MongoDB supports both JSON and BSON. Cassandra only supports JSON
MongoDB supports both primary and secondary indexes. Cassandra support for secondary indexes is much more restrictive.
MongoDB provides multi document ACID transactions with snapshot isolation while Cassandra does not have proper ACID but can be tuned to support it.
MongoDB allows for more complicated queries to retrieve data. Cassandra is more basic.
So Cassandra is better when you want speed and do not care about sophisticated queries and ACID as much.
Back: noSQL | Overview of Tech
Page Author: JD