About the Cassandra Query Language (CQL)
CQL is a query language similar to SQL, that is used to interact with Cassandra databases. It is a high-level language that abstracts away some of the low-level details of the Apache Cassandra® database. CQL syntax is similar to SQL, with differences that allow users to store and retrieve data from a non-relational database.
Be sure you understand the structure that Cassandra uses to store the data before exploring how to manipulate data with CQL.
To gain a deep appreciation of the differences, be sure to read about data modeling.
CQL is used for all the standard database CRUD operations, like creating, reading, updating, and deleting various database objects. It is a method of defining and manipulating keyspaces, tables, columns, user-defined types (UDTs) ,user-defined functions (UDFs), user-defined aggregates (UDAs), and indexes. In addition, roles and access permissions can be managed with CQL.
Some database objects have schema that is keybase-wide, while other schema is table-based.
CQL can be used with Apache Cassandra, DataStax Astra DB, and DataStax Enterprise. Each database has a different set of CQL commands that are supported.
Astra DB, Apache Cassandra®, and DataStax Enterprise (DSE) can interact with CQL in the following ways:
DataStax Astra DB Serverless
in-application CQL shell, standalone cqlsh
built-in cqlsh, standalone cqlsh
DataStax Enterprise (DSE)
built-in cqlsh, standalone cqlsh, DataStax Studio
All of the various database products can also use the Stargate APIs or language drivers to interact with the database, passing CQL commands to the Cassandra cluster.