Introduction to Cassandra Query Language
Cassandra Query Language (CQL) is a query language for the Cassandra database.
Data modeling concepts
How data modeling should be approached for Cassandra. A Pro Cycling statistics example is used throughout the CQL document.
Data modeling analysis
How to analyze a logical data model.
CQL provides an API to Cassandra that is simpler than the Thrift API.
Starting the CQL shell (cqlsh)
How to start the CQL shell (cqlsh).
Creating and updating a keyspace
Creating a keyspace is the CQL counterpart to creating an SQL database.
Creating a table
How to create tables to store data.
Creating a materialized view
How to create CQL materialized views.
Creating advanced data types in tables
How to create collections and user defined types (UDTs) in tables.
How to create functions.
Inserting and updating data
How to insert data into a table with either regular or JSON data.
Batching data insertion and updates
How to batch insert or update data into a table.
How to query data from tables.
How to query data from tables using indexes.
Altering a table
How to alter a table to add or delete columns or change table properties.
Altering a materialized view
Altering the properties of a materialized view with the ALTER MATERIALIZED VIEW command.
Altering a user-defined type
Adding columns to a user-defined type with the ALTER TYPE command.
Securing a table
How to secure a table.
Tracing consistency changes
This tutorial shows the difference between these consistency levels and the number of replicas that participate to satisfy a request.
Determining time-to-live (TTL) for a column
How to insert and retrieve data pertaining to TTL for columns.
Determining the date/time of a write
Using the WRITETIME function in a SELECT statement to determine when the date/time that the column was written to the database.
How to work with legacy tables.
About using CQL.
CQL lexical structure
CQL input consists of statements that change data, look up data, store data, or change the way data is stored.
CQL data types
Built-in data types for columns.
CQL support functions for transforming one or more column values into a new value.
Upper CQL limits.
CQL shell commands
The CQL shell (cqlsh utility) commands.