Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions C++ Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions F# Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions

Top 30 Cassandra Interview Questions for 2022

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.



ADVERTISEMENT
ADVERTISEMENT