CQL for Cassandra 2.0

Data modeling example

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. Tables can be created, dropped, and altered at runtime without blocking updates and queries.

The example of a music service shows how to use compound keys, clustering columns, and collections to model Cassandra data.

Show/hide