×

Top 30 Cassandra Interview Questions for 2024

1) Explain. What is Cassandra?

Cassandra is an open source data storage system. It was developed at Facebook for inbox search and designed for storing and managing large amount of data.

2) What is the use of Cassandra & Why to use Cassandra?

Cassandra is used to handle big data workloads across multiple nodes without any single point failure. There are some various features of Cassandra:
  • It is fault tolerant and consistent
  • It is a column-oriented database
  • Flexible schema design. etc.

3) What is composite type in Cassandra?

In Cassandra, Composite type is used to express the key or column name with the help of concatenation of data in different type. There are two ways to manipulate the data that are given below:
  • Row key
  • Column Name

4) How Cassandra stores data?

Writing data involves some important steps that are listed below.
  • Logging data in the commit log
  • Writing data to the memtable
  • Flushing data from the memtable
  • Storing data on disk in SSTables

5) What are the components of Cassandra Data Model?

There are various components of Cassandra data model that are given below:
  • Cluster
  • Keyspace
  • Column
  • Column & Family

6) Explain what is a column family in Cassandra?

In Cassandra, column family is referred as a collection of rows.

7) What are the other components of Cassandra?

There are some other following components of Cassandra:
  • Node
  • Data Center
  • Cluster
  • Commit log etc.

8) How to write Cassandra data?

We can write the Cassandra data with the help of three components that are given below:
  • Commitlog Write
  • Memtable Write
  • SStable Write

9) What is mandatory while creating a table in Cassandra?

In Cassandra Primary key is Mandatory while creating table. It is made up one or more columns of table.

10) What are Cassandra-CQL collections?

Cassandra-CQL collections help to store multiple values in a single variable that are table formed.
Type Description
List It maintain the order of data when needed value store multiple times.
Set It store data in the form of group element.
Map It is a data type, which is used to store a key-value pair of element

11) What is the syntax to create keyspace in Cassandra?

Cassandra use following syntax for creating keyspace that is given below:
CREATE KEYSPACE <identifier > WITH <properties>

12) What are the keyspace in Cassandra?

In Cassandra, keyspace is a namespace that shows replication on nodes. A cluster contains of keyspace per node.

13) Does Cassandra works on windows?

Yes, Cassandra works well on windows. It also works on Linux operating system.

14) Cassandra is written in which language?

Cassandra is written in Java language.

15) What is the different b/w Cassandra and MongoDB?

Criteria Mongo DB Cassandra
Data Model Document Big Table like
Database scalability Read Write
Querying of data Multi-indexed Using Key or Scan

16) What ports does Cassandra use?

By default Cassandra use port- 7000 for cluster communication.

17) What are the consistency levels for read operation in Cassandra?

Cassandra provides some consistency levels for read operation these are given below:
Type of Operation Description
ALL It is highly consistent. A write must be written to commitlog and memtable on all replica nodes in the cluster
EACH_QUORUM A write must be written to commitlog and memtable on quorum of replica nodes in all data center.
LOCAL_QUORUM A write must be written to commitlog and memtable on its replica nodes in the same center.
ONE A write must be written to commitlog and memtable of at least one replica node.
TWO, THREE Same as One but at least two and three replica nodes respectively.
LOCAL_ONE The Write must be written at least one replica node
SERIAL Linearizable Consistency to prevent unconditional update.
LOCAL_SERIAL Same as Serial but restricted to local data center.

18) What is Thrift?

Thrift is the name of the RPC (Remote Procedure Call) client that is used to communicate with the Cassandra serve. In other words, thrift is a legacy RPC protocol or API unified with a code generation tool for CQL. It facilitates to access the Database across the Programming language.

19) Explain Tombstone in Cassandra?

In Cassandra, tombstone is used to create row maker indicating a column deletion. It marks that columns are deleted during compaction.

20) What is CQL?

CQL is Cassandra Query language, which is used to access query the Apache distributed database. The syntax of CQL is similar to SQL but it does not alter the Cassandra data model.

21) Explain what is Cassandra-Cqlsh?

Cassandra Cqlsh is a query language that helps users to communicate with Database. It allows us to do the following things:
  • Define a schema
  • Insert a data
  • Execute a query

22) What do you mean by Kundera?

Kundera is an Object Mapper library that is used with the NoSql databases. It is written in java and can used in Cassandra, MongoDB etc.

23) Mention what need to be take care while adding a column in Cassandra?

While adding a column you need to take care the following points:
  • Column is not conflicting with the existing column names.
  • Table is not defined with compact storage option.

24) What is Replication Factor in Cassandra?

Replication Factor is used to measure the number of data existing copied data. It is important to increase the replication factor to log into the cluster.

25) What is the use of truncate command?

Truncate command is used to delete all the rows of the table permanently. Syntax:
TRUNCATE <tablename>

26) What are the various shell commands?

There are various shell commands that are given below:
Shell Commands Description
Help It is used to displays a synopsis and a brief description.
Capture It is used to captures the output of a command and adds it to a file.
Consistency It is used to shows the current consistency level.
Copy This command is used to copy the data.
Describe This command is used to describe the current cluster of Cassandra and its objects.

27) What are the CQL users-define data types?

There are following CQL user define data types:
  • CREATE TYPE: It is used to create a user-defined datatype.
  • ALTER TYPE: It is used to modify a user-defined datatype.
  • DROP TYPE: It is used to drop a user-defined datatype.
  • DESCRIBE TYPE: It is used to describe a user-defined datatype.
  • DESCRIBE TYPES: It is used to describe user-defined datatypes.

28) What is the syntax to create trigger?

The following is the syntax for create trigger:
create_trigger_statement ::=  CREATE TRIGGER [ IF NOT EXISTS ] trigger_name  
                  ON table_name  
                  USING string

29) What are the types of CQL functions?

There are two types of CQL functions that are given below:
  • scalar functions: scalar function take a number of values and produce an output with it.
  • aggregate functions : aggregate functions are used to aggregate multiple rows results from a SELECT statement.

30) Does Cassandra support JSON?

Yes, Cassandra supports JSON.

Related Topics

Top 30 Ruby on Rails Interview Questions for 2024

1) What is Ruby on Rails? It is a server-side web application framework. It is an open source ruby framework which is used for developing database-backed web applications. Here, no compilation phase is...

4 minutes read.

SSRS Interview Questions

1. What is SSRS? The Microsoft SQL Server Reporting Service (SSRS) is a server-based reporting platform. It allows you to produce structured reports. The reports are generally represented in the form of data, graph,...

5 minutes read.

Top 31 CakePHP Interview Questions for 2024

1) What is CakePHP? CakePHP is an open-source PHP framework. It is used to develop dynamic web applications. It helps to developers to work in a structured manner. 2) When cakePHP was...

5 minutes read.

Top 26 CouchDB interview questions for 2024

1) What is CouchDB? CouchDB is a document typed database server which can be accessed through RESTful JSON API. It is a schema free and Ad-hoc database with a flat address...

4 minutes read.

Top 15 Xamarin Interview Questions for 2024

1) What is Xamarin? Xamarin is a .NET framework. It allows to create an application that run on multiple platforms. Xamarin Tutorial uses C# language and .NET framework to deliver native...

2 minutes read.

Top 15 Struts Interview Questions for 2024

1) What are the Features of Struts 2? Features of Struts 2 are: Configurable MVC components POJO based actions AJAX support Integration support Various Result Types Various Tag support Theme and...

3 minutes read.

Top 50 ReactJS Interview Questions for 2024

Top 50 Frequently asked ReactJS Interview Questions Q-1. What is React? Ans-1 React is a front-end JavaScript library which is developed by Facebook in 2011. It follows the component-based approach and allows us to...

15 minutes read.

Top 15 PostgreSQL Interview Questions for 2024

1) What is PostgreSQL? PostgreSQL is a most advance open source database system. PostgreSQL is an object Oriented Relational Database Management System (ORDBMS). PostgreSQL source code is available free of charge...

3 minutes read.

Top 14 Materialize CSS Framework Interview Questions for 2024

1) What is Materialize? Materialize is a CSS framework that contains library file. It is created with CSS, JavaScript and HTML. It helps to create attractive, reliable and functional web pages...

7 minutes read.

Top 15 Java BeanUtils Interview Questions for 2024

1) What is Java BeanUtils? Java BeanUtils is a design pattern component of the Apache Commons. It facilitates architecture for Java language which is derived from JavaAPI. It helps to set...

3 minutes read.

C++ | C Plus Plus Interview Questions for 2024

1) Write a program in C++ to print "Hello World"? #include <iostream.h>     #include <conio.h>   void main()    {       clrscr();       cout << "Hello World";     getch();     } 2) Write a program in C++ to enter two integers and find their sum and average ? #include <iostream.h>   #include <conio.h>   void main()   {   clrscr();   int x,y;   float sum,average;   cout << "Enter 2 integers : " << endl;   cin>>x>>y;   sum=x+y;   average=sum/2;   cout <<"The sum is:"<< sum << endl;   cout <<"The average is:"<< average << endl;   getch();   } 3) Write a program in...

5 minutes read.

Top 15 NodeJS Interview Questions for 2024

1) What is NodeJs? NodeJs is open source JavaScript based feamework used to develop I/O intensive web application. It is collections of JavaScript library and runtime environment. It is used to...

3 minutes read.

Top 15 Data structure & Algorithm Interview Questions for 2024

1) What is Data Structure? Data structure is a way of storing, collecting and organizing data into the main memory. It makes data access more efficient and increase performance. Array, List, Queue...

3 minutes read.

Top 13 SAS Interview Questions for 2024

1. What is SAS and its functions? SAS (Statistical Analysis System) is statistical software designed by SAS Institute in 1960 for data inspection and report writing. SAS runs on Windows, UNIX...

5 minutes read.

Top 30 AngularJS Interview Questions and Answers for 2024

Most Frequently asked AngularJS Interview Questions and Answers for Fresher 1) Describe Angular JS ? It is a powerful framework of JavaScript. AngularJS is used to design Rich Internet Application. This framework...

5 minutes read.

Top 30 Perl interview questions for 2024

1) What is Perl? It is a programming language which is used for web development, system administration, GUI development and etc. It is also known as cross-platform programming language. 2) What are the...

4 minutes read.

Top 30 D Programming Language Interview Questions for 2024

1) What is D programming language? D programming language is an object oriented programming language. It is created by Walter Bright of Digital Mars. It was released in 2001. 2) Who is the...

4 minutes read.

Top 10 Java Swing Interview Questions for 2024

1) What is Java Swing? It is a part of JFC (Java Foundation Classess) that is used to create window-based applications. Java Swing components are platform independent and lightweight . 2) What is...

3 minutes read.

WebSockets Interview Questions

1) What is Web Sockets? Web Sockets is a two way communication between the clients and the servers. Here, the clients and servers both the parties can communicate and exchange data...

3 minutes read.

Top 14 Elixir Interview Questions for 2024

1) What is Elixir? Elixir is a dynamic, functional language. It is designed to build scalable and maintainable applications. 2) Who developed Elixir? Ericsson developed elixir in 1986. 3) What is the stable version of...

2 minutes read.