Skip to main content

What is Apache Cassandra?

Understanding Cassandra

Apache Cassandra is an open-source, NoSQL database designed to store data for applications that require fast read and write performance. With Cassandra, data is organized into keyspaces and tables. Keyspaces are collections of tables that you use to represent table groupings, such as different system components, applications, or environments. Each table in Cassandra has a schema. Schemas define the columns within a table, and the data type of each column.

Cassandra stores data within tables in rows. Each row in a table has a primary key which uniquely identifies the row within the table. Primary keys are composed of partition keys and optional clustering columns. Partition keys can be simple and made up of a single column, or rows can have compound partition keys composed from multiple columns. Rows also can have clustering columns, which is used to sort rows within the same partition.

Learn how Amazon Keyspaces (for Apache Cassandra), a serverless, fully managed, Apache-Cassandra compatible database service can help you easily run Cassandra workloads. The data modeling guide is available in the Amazon Keyspaces Developer Guide.

The official Apache Cassandra logo, featuring a stylized eye with blue and white elements and the word 'cassandra' underneath.

Cassandra Query Language (CQL)

You can read, write, update, and delete data from Cassandra by using the Cassandra Query Language (CQL). CQL is a flexible, SQL-like API that enables developers to execute data definition language (DDL) and data manipulation language (DML) statements. You use DDL statements to create and define resources. For example, the following DDL statement creates a table named books in a keyspace named bookstore with a primary key column of isbn.

Learn more about CQL
sql
CREATE TABLE bookstore.books ( 
  isbn text, 
  title text, 
  author text, 
  year_of_publication int 
  PRIMARY KEY (isbn)
);

You use DML statements to manipulate data in a table. For example, the following DML statement inserts a new row into books table.

INSERT INTO bookstore.books (isbn, title, author, year_of_publication,) VALUES (‘0101010101010’, ‘The Long River’, ‘Jim Sozeb’,’1994’);

Learn more about CQL in the CQL Language Reference for Amazon Keyspaces (for Apache Cassandra).

Open source community

As an active member of the Apache Cassandra community, AWS publishes code samples for a variety of programming languages to help new Cassandra developers get started. The Apache Cassandra community’s main annual event is ApacheCon. Below are videos from AWS presented sessions from previous ApacheCon conferences.

Getting started

Easy ways to explore Keyspaces

Create your first keyspace and table

Learn how to get started with Cassandra with just a few clicks.

Explore code samples

Discover collection of codes samples for Keyspaces on GitHub.

Start building in the console

Get started in building in the AWS Management Console.

Sign up for a free account

Instantly access AWS Free Tier.