Apache Cassandra is a free distributed, high performance, scalable fault tolerant post-relational DB system (which follows flat file DB system).
Typically this is used when huge data needs to be stored (in flat-file system) in a no-sql environment. The DB was primarily used by Facebook and later it was popular as a no-sql, flat file DB system. This DB is used extensively for business intelligent systems.
Advantage of Cassandra over SQL DB are:
No fixed schema (as no-sql), freq of handling the data is very high and a huge volume of data can be handled easily using Cassandra. Moreover, it doesnot have a single point of failure and Cassandra is deployed in Horizontal fashion.
Now, you might be wondering why Cassandra is fault-tolerant (or why there is no single point of failure)?
The answer lies in the architecture of Cassandra. It has a master-less design with the concept of Node and all the nodes are treated as same in Cassandra.
What is the advantage that Cassandra is providing with respect to other no-sql DBs. In short, why Cassandra?
Simple reason is, the fault tolerant structure Cassandra provides that can be replicated in any Data center without hiccups (irrespective of geographical boundaries). Moreover it supports 50,000 transactions per second per node. Which makes the transaction super fast.
Components of Cassandra:
Node (place where Data is stored).
Data Center (collection of Nodes).
Cluster (collection of Data Centers).
Commit log: Mainly used for crash recovery mechanism. As all the transaction is written in commit log.
Mem-table: After the data is written in commit-log then it is stored in mem-table.
SS table: This is a disk file, while data is flushed (when data reached its threshold value) from mem-table, it is stored in SS table.
Installation:
What you need: JDK, downloaded exe file from DataStax , Cassandra CQL shell (where we can write cqlsh, which is nothing but cassandra query language shell).
We can use commands like: Help, Copy, Capture, Describe, Exit, Create Keyspace, create table, alter table, drop table, insert, update, delete, alter, drop, select, batch etc.
CASSANDRA JAVA API
The driver should contain: driver-core, driver-mapping, driver-extras, driver-tests (use maven to get the latest versions)
<
dependency
>
<
groupId
>com.datastax.cassandra</
groupId
>
<
artifactId
>cassandra-driver-core</
artifactId
>
<
version
>3.1.0</
version
>
</
dependency
>
<
dependency
>
<
groupId
>org.cassandraunit</
groupId
>
<
artifactId
>cassandra-unit</
artifactId
>
<
version
>3.0.0.1</
version
>
</
dependency
>
new KeyspaceRepository().createKeyspace(keyspaceName,
"SimpleStrategy"
,
1
);

Really liked the content. Thank you for the detailed description with nitty-gritty part of it. Keep it up.
Thank you.