Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

5/20/2020

Reading time:4 min

Cassandra Tutorial for Beginners | Learn Apache Cassandra - DataFlair

by DataFlair Team

Keeping you updated with latest technology trends, Join DataFlair on Telegram1. Apache Cassandra Tutorial – ObjectiveIn this Apache Cassandra Tutorial, we will learn about what is Cassandra, what is NoSQL database and also a short introduction of Relational/SQL vs NoSQL database. We will also learn about different Apache Cassandra features, Cassandra History, Architecture of Cassandra. In addition, we are going to study Apache Cassandra Applications and Cassandra Data Model.As the technology advances, the data has also expanded and grown exponentially. So, there is a need for a new database. After many databases, Apache Cassandra came up eventually, fulfilling every requirement.So, let’s start Cassandra Tutorial.Apache Cassandra Tutorial for Beginners | Learn Cassandra2. What is NOSQL Database?There are two types of databases, Relational or SQL Database and NoSQL Database. Relational Database provides a mechanism to store and retrieve data through tabular relations. In other words, it consists of relational data. Whereas, NoSQL database consists of non-relational data. This NoSQL database has a few advantages over SQL or Relational Database. They can handle a huge amount of data and support easy replication and also have a simple API. In this different data structures are used as compared to the relational database.Apache Cassandra Tutorial – Relational Vs NoSQL DatabaseExamples of Relational Database: MySQL, IBM DB2, Oracle DB etcExamples of NoSQL Database: Apache Cassandra, Apache HBase, MongoDB etc.3. What is Apache Cassandra?Apache Cassandra is an example of NoSQL Database. It is a distributed, decentralized and an open-source database or a storage system. It is basically used for managing very large amounts of structured data. There is no single point of failure, providing highly available services.Have a look at Cassandra vs MongoDBApache Cassandra Tutorial – What is Cassandra4. Cassandra FeaturesIn this part of Cassandra Tutorial, we discuss some important features of Cassandra:Apache Cassandra Tutorial- Cassandra Featuresa. DecentralizedEvery node in the cluster is identical. There are no single points of failure.b. Fault ToleranceSince data is replicated to multiple nodes, fault tolerance is pretty high. Also, any failed nodes are related with no downtime.Do you know about Cassandra Curd Operationc. PerformanceThe fundamental architecture of Apache Cassandra is very robust. Therefore, it proves to be better than the alternatives.d. ScalableIt is linearly scalable. In other words, the throughput is increased as you increase the number of nodes in the Cassandra cluster.e. ProvenApache Cassandra is used at various companies. Some of them are Netflix, GoDaddy, GitHub, eBay etc.These features of Apache Cassandra shows that it is actually very powerful and reliable.5. Cassandra Tutorial – HistoryAvinash Lakshman and Prashant Malik initially developed Cassandra at Facebook. In July 2008, Facebook released Cassandra as an open-source project on Google Code. Later in March 2009, it became Apache Incubator project. Eventually, it became a top-level project in February 2010.After that there were many releases of Apache project:Have a look at Cassandra Documented shell CommandsTable no.1 Apache Cassandra Tutorial – Cassandra HistoryS. No.VersionRelease Date10.6April 12, 201020.7January 08, 201130.8June 02, 201141.0October 17, 201151.1April 23, 201261.2January 02, 201372.0September 01, 201382.1September 10, 201492.2July 20, 2015103.0November 11, 2015113.1–123.11June 23, 2017133.11.2Feb 19,2018Apache Cassandra Tutorial – Cassandra History6. Cassandra ArchitectureThe architecture of Cassandra has various components. Some of them are:Apache Cassandra Tutorial – Cassandra Architecturea. NodeData is stored here.b. Data CenterIt is a collection of related nodes.Apache Cassandra Tutorial – Data Centerc. Commit LogIt is a mechanism in Cassandra for recovery when it crashes.d. ClusterCollection of data centres.Let’s take a tour to Cassandra Collection Data Typese. Mem-TableIt is a memory resident data structure.f. SSTableWhen the contents of mem-table reach the threshold value, the data is flushed here.g. Bloom FilterThese are algorithms to test if an element is a member of a set.h. CompactionIt is the process of freeing up space by merging the large accumulated data files.7. Cassandra Tutorial – Data ModelBelow, we are discussing data models in Cassandra:Apache Cassandra Tutorial – Data Modela. ClusterA Cassandra Cluster is a storage unit for data centers.b. KeyspaceThe outermost storage container for data in Cassandra is keyspace.8. Cassandra ApplicationsCassandra is used for many applications. Some of Cassandra Applications are:AppScale: Back-end for Google App Engine applications.Cisco‘s WebEx: storage for user feed and activity in near real time.Globo.com:Back-end database for their streaming services.Mahalo.com:Record user activity logs and topics for their Q&A website.Netflix: Back-end database for their streaming services.Nutanix: Store metadata and stats.Apache Cassandra Tutorial – Cassandra Applications 9. Conclusion – Apache Cassandra TutorialHence, in this Apache Cassandra Tutorial, we studied that Cassandra is an open source database which can manage a large amount of structured data. Moreover, we went through two basic models of Cassandra i.e. cluster and keyspace. Also, we looked at Cassandra features, and applications Next article will be about books on Cassandra, that will help to increase your knowledge. Furthermore, if you have any query, feel free to ask in the comment section.See also –Cassandra vs HadoopFor reference 

Illustration Image

Keeping you updated with latest technology trends, Join DataFlair on Telegram

1. Apache Cassandra Tutorial – Objective

In this Apache Cassandra Tutorial, we will learn about what is Cassandra, what is NoSQL database and also a short introduction of Relational/SQL vs NoSQL database. We will also learn about different Apache Cassandra features, Cassandra History, Architecture of Cassandra. In addition, we are going to study Apache Cassandra Applications and Cassandra Data Model.

As the technology advances, the data has also expanded and grown exponentially. So, there is a need for a new database. After many databases, Apache Cassandra came up eventually, fulfilling every requirement.

So, let’s start Cassandra Tutorial.

Apache Cassandra Tutorial

Apache Cassandra Tutorial for Beginners | Learn Cassandra

2. What is NOSQL Database?

There are two types of databases, Relational or SQL Database and NoSQL Database. Relational Database provides a mechanism to store and retrieve data through tabular relations. In other words, it consists of relational data. Whereas, NoSQL database consists of non-relational data. This NoSQL database has a few advantages over SQL or Relational Database. They can handle a huge amount of data and support easy replication and also have a simple API. In this different data structures are used as compared to the relational database.

Apache Cassandra Tutorial

Apache Cassandra Tutorial – Relational Vs NoSQL Database

Examples of Relational Database: MySQL, IBM DB2, Oracle DB etc
Examples of NoSQL Database: Apache Cassandra, Apache HBase, MongoDB etc.

3. What is Apache Cassandra?

Apache Cassandra is an example of NoSQL Database. It is a distributed, decentralized and an open-source database or a storage system. It is basically used for managing very large amounts of structured data. There is no single point of failure, providing highly available services.

Have a look at Cassandra vs MongoDB

Apache Cassandra Tutorial

Apache Cassandra Tutorial – What is Cassandra

4. Cassandra Features

In this part of Cassandra Tutorial, we discuss some important features of Cassandra:

Apache Cassandra Tutorial- Cassandra Features

Apache Cassandra Tutorial- Cassandra Features

a. Decentralized

Every node in the cluster is identical. There are no single points of failure.

b. Fault Tolerance

Since data is replicated to multiple nodes, fault tolerance is pretty high. Also, any failed nodes are related with no downtime.

Do you know about Cassandra Curd Operation

c. Performance

The fundamental architecture of Apache Cassandra is very robust. Therefore, it proves to be better than the alternatives.

d. Scalable

It is linearly scalable. In other words, the throughput is increased as you increase the number of nodes in the Cassandra cluster.

e. Proven

Apache Cassandra is used at various companies. Some of them are Netflix, GoDaddy, GitHub, eBay etc.
These features of Apache Cassandra shows that it is actually very powerful and reliable.

5. Cassandra Tutorial – History

Avinash Lakshman and Prashant Malik initially developed Cassandra at Facebook. In July 2008, Facebook released Cassandra as an open-source project on Google Code. Later in March 2009, it became Apache Incubator project. Eventually, it became a top-level project in February 2010.
After that there were many releases of Apache project:

Have a look at Cassandra Documented shell Commands
Table no.1 Apache Cassandra Tutorial – Cassandra History

S. No.VersionRelease Date
10.6April 12, 2010
20.7January 08, 2011
30.8June 02, 2011
41.0October 17, 2011
51.1April 23, 2012
61.2January 02, 2013
72.0September 01, 2013
82.1September 10, 2014
92.2July 20, 2015
103.0November 11, 2015
113.1
123.11June 23, 2017
133.11.2Feb 19,2018
Apache Cassandra Tutorial

Apache Cassandra Tutorial – Cassandra History

6. Cassandra Architecture

The architecture of Cassandra has various components. Some of them are:

Apache Cassandra Tutorial - Cassandra Architecture

Apache Cassandra Tutorial – Cassandra Architecture

a. Node

Data is stored here.

b. Data Center

It is a collection of related nodes.

Apache Cassandra Tutorial

Apache Cassandra Tutorial – Data Center

c. Commit Log

It is a mechanism in Cassandra for recovery when it crashes.

d. Cluster

Collection of data centres.

Let’s take a tour to Cassandra Collection Data Types

e. Mem-Table

It is a memory resident data structure.

f. SSTable

When the contents of mem-table reach the threshold value, the data is flushed here.

g. Bloom Filter

These are algorithms to test if an element is a member of a set.

h. Compaction

It is the process of freeing up space by merging the large accumulated data files.

7. Cassandra Tutorial – Data Model

Below, we are discussing data models in Cassandra:

Apache Cassandra Tutorial

Apache Cassandra Tutorial – Data Model

a. Cluster
A Cassandra Cluster is a storage unit for data centers.
b. Keyspace
The outermost storage container for data in Cassandra is keyspace.

8. Cassandra Applications

Cassandra is used for many applications. Some of Cassandra Applications are:

  1. AppScale: Back-end for Google App Engine applications.
  2. Cisco‘s WebEx: storage for user feed and activity in near real time.
  3. Globo.com:Back-end database for their streaming services.
  4. Mahalo.com:Record user activity logs and topics for their Q&A website.
  5. Netflix: Back-end database for their streaming services.
  6. Nutanix: Store metadata and stats.
Apache Cassandra Tutorial - Cassandra Applications

Apache Cassandra Tutorial – Cassandra Applications

 9. Conclusion – Apache Cassandra Tutorial

Hence, in this Apache Cassandra Tutorial, we studied that Cassandra is an open source database which can manage a large amount of structured data. Moreover, we went through two basic models of Cassandra i.e. cluster and keyspace. Also, we looked at Cassandra features, and applications Next article will be about books on Cassandra, that will help to increase your knowledge. Furthermore, if you have any query, feel free to ask in the comment section.

See also –

Cassandra vs Hadoop
For reference 

Related Articles

windows
cassandra
tutorial

Install Cassandra on Windows 10: Tutorial With Simple Steps

Vladimir Kaplarevic

12/2/2023

cassandra
tutorial

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra