Cassandra Query Language (CQL)
Cassandra Query Language (CQL) is the native query language of Apache Cassandra®. You can use CQL to interact with DataStax Astra DB, Hyper-Converged Database, DataStax Enterprise, and Cassandra databases. CQL syntax is similar to SQL, but includes key differences to interact with distributed, non-relational data.
CQL includes both Data Definition Language (DDL) and Data Manipulation Language (DML) commands. DDL commands are used to create, alter, and drop keyspaces, tables, and other database objects. DML commands are used to insert, update, delete, and query data in tables. Each database product supports a slightly different set of CQL commands.
Use CQL
You can use a variety of tools to execute CQL commands:
-
The CQL shell is a command-line interface that lets you interact with the database using CQL commands. The Astra Portal has an embedded CQL shell.
-
DataStax drivers let you execute CQL commands in a variety of programming languages.
-
DataStax Studio lets you run CQL commands and visualize the results in self-documenting notebooks.
The following table lists the CQL tools that are compatible with each database product:
Database | Embedded CQL shell | cqlsh |
DataStax drivers | DataStax Studio |
---|---|---|---|---|
Astra DB |
||||
HCD |
||||
DSE |
||||
Cassandra |