About CQL
CQL (Cassandra Query Language) is a query language for the DataStax Enterprise database.
CQL data modeling
Basic rules to follow when designing a DataStax Enterprise database.
Data modeling concepts
Uses a Pro cycling example to demonstrate the query drive approach to data modeling.
Data modeling analysis
Analyze the design based on storage, capacity, redundancy, and consistency.
Introduction to CQL commands
Shows the CQL command syntax and rules, and provides instruction on using CQL shell (cqlsh).
Accessing data using CQL
Resources for running CQL commands, including steps to launch the cqlsh utility.
Understanding the CQL command syntax
Provides the basic rules and limitations for writing CQL statements.
Managing keyspaces
Create and drop keyspaces, and manage the replication factor (data availability).
About keyspaces
Top level database object that contains tables, materialized views, user-defined types, functions, and aggregates and controls the data replication factor.
Creating a keyspace
Add a new keyspace and set the replication factor.
Modifying the replication factor
Increasing the replication factor increases the total number of copies of keyspace data stored in a cluster.
Dropping a keyspace
Remove a keyspace and all the database objects it contains.
About system keyspace tables
Provides details about database objects and cluster configuration in the system keyspace tables.
Managing types, functions, and aggregates
Create, replace, alter, and drop customized user-defined functions, aggregates, and types.
Creating user-defined function (UDF)
Write custom functions using Java and other programming languages for use in SELECT, INSERT, and UPDATE statements.
Creating User-Defined Aggregate Function (UDA)
User-Defined Aggregates(UDAs) can be used to manipulate stored data across rows of data, returning a result that is further manipulated by a final function.
Modifying a user-defined type
Adding columns to a user-defined type with the ALTER TYPE command.
Dropping a user-defined function (UDF)
How to use the DROP command to delete a user-defined function (UDF).
Managing tables
How to create tables to store data.
Creating a table
How to create CQL tables.
Creating a materialized view
How to create CQL materialized views.
Creating a counter table
A counter is a special column for storing a number that is changed in increments.
Creating a table with COMPACT STORAGE
Create a table that is compatible with the legacy (Thrift) storage engine format.
Table schema collision fix
How to fix schema collision problems.
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.
Dropping a table or materialized view
Steps for dropping keyspace, table or materialized view using the DROP command.
Indexing tables
How to query data from tables using indexes.
Querying data
Retrieve data sets from a table using SELECT statements.
About SELECT statements
Retrieving data from tables.
Setting consistency levels
Set the consistency level to control the accuracy of the data returned by read request.
Writing conditional statements
Scanning partition when the table has more than one clustering column and comparing groups of clustering keys to certain values.
Sorting and limiting results
Using the SELECT command for simple queries.
Returning collections
How to retrieve data from a collection.
Aggregating results
Using the SELECT command to return data and apply standard aggregate functions.
Using user-defined functions (UDF)
Using the SELECT command to return data and applying a UDF.
Returning the write timestamp
Using the WRITETIME function in a SELECT statement to determine when the date/time that the column was written to the database.
Formatting query results as JSON
Using the SELECT command to return JSON data.
Legacy tables
How to work with legacy tables.
Inserting and updating data
How to insert data into a table with either regular or JSON data.
Using INSERT and UPDATE to write values
Inserting set data with the INSERT command.
Using lightweight transactions
INSERT and UPDATE statements that use the IF clause support lightweight transactions, also known as Compare and Set (CAS).
Inserting JSON formatted values
Inserting JSON data with the INSERT command for testing queries.
Importing data from a CSV file
Inserting data with the cqlsh command COPY from a CSV file is common for testing queries.
Deleting values
Use the DELETE command to replace the value in a column with null or to remove an entire row of data.
Expiring data with time-to-live
Use time-to-live (TTL) to expire data in a column or table.
Batching inserts and updates
Performing multiple writes in the same command.
Batching inserts, updates and deletes
Batching inserts, updates and deletes.
Good use of BATCH statement
How to use a BATCH statement.
Misuse of BATCH statement
How to misuse a BATCH statement.
CQL reference
CQL reference topics.
Introduction
About using CQL.
CQL data types
Describes CQL column types.
CQL native functions
Describes scalar functions that work on values in a single row of data to create a new value.
CQL native aggregates
Works on a set of rows matching the SELECT statement to return a single value.
CQL shell commands
The CQL shell (cqlsh utility) commands.
CQL commands
CQL commands.
Cycling keyspace
CQL commands to set up the cycling examples used in this guide.
Cycling tables
CQL commands that create cycling example tables and insert the corresponding data.