About CQL for Cassandra 1.2
Cassandra Query Language (CQL) is a query language for the Cassandra database.
CQL data modeling
Data modeling topics.
Introduction
Cassandra's data model is a partitioned row store with tunable consistency. Rows are organized into tables; the first component of a table's primary key is the partition key; within a partition, rows are clustered by the remaining columns of the key. Other columns can be indexed separately from the primary key.
Data modeling
A brief description of data modeling in Cassandra.
Indexing
An index provides a means to access data in Cassandra using attributes other than the partition key for fast, efficient lookup of data matching a given condition.
Working with pre-CQL 3 applications
Internally, CQL does not change the row and column mapping from the Thrift API mapping. CQL and Thrift use the same storage engine.
Using CQL
Topics for using CQL.
Using CQL
You can use CQL on the command line of a Cassandra node, from DataStax DevCenter, or programmatically using a number of APIs and drivers.
Starting cqlsh
How to start cqlsh.
Using tab completion
You can use tab completion to see hints about how to complete a cqlsh command.
Creating and updating a keyspace
Creating a keyspace is the CQL counterpart to creating an SQL database.
Creating a table
Steps for creating a table with a single primary key.
Querying a system table
Details about Cassandra database objects and cluster configuration in the system keyspace tables.
Retrieving and sorting results
Using the SELECT command.
Using the keyspace qualifier
To simplify tracking multiple keyspaces, use the keyspace qualifier instead of the USE statement.
Determining time-to-live for a column
Steps for creating a table, inserting data into two columns, and calling the TTL function to retrieve the date/time of the writes to the columns.
Determining the date/time of a write
Using the WRITETIME function in a SELECT statement to return the date/time in microseconds when the column was written to the database.
Adding columns to a table
Using the ALTER TABLE command to add new columns to a table.
Altering the data type of a column
Using ALTER TABLE, you can change the data type of a column after it is defined or added to a table.
Removing data
Setting the column values for automatic removal using the TTL (time-to-expire) table attribute.
Using collections
Collection types provide an improved way of handling tasks, such as building multiple email address capability into tables.
Indexing a column
Using cqlsh to create an index on column values.
Paging through unordered partitioner results
Using CQL to page through rows.
Using a counter
A counter is a special column for storing a number that is changed in increments.
CQL reference
CQL reference topics.
Introduction
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.
Data types
Built-in data types for columns.
Keyspace properties
About using CQL keyspace and table properties.
Table properties
A list of CQL table properties and their syntax.
Subproperties of compaction
Constructing a map of the compaction property and its subproperties.
Subproperties of compression
Configuring compression for a table.
cqlsh commands
A list of cqlsh commands.
CQL commands
A list of CQL commands.