Skip to Content
Mastering Apache Cassandra 3.x - Third Edition
book

Mastering Apache Cassandra 3.x - Third Edition

by Aaron Ploetz, Tejaswi Malepati
October 2018
Beginner to intermediate content levelBeginner to intermediate
348 pages
10h
English
Packt Publishing
Content preview from Mastering Apache Cassandra 3.x - Third Edition

Data cells

Sometimes structures for storing column values are referred to as cells. Queries to Cassandra essentially return collections of cells. Assume the following table definition for keeping track of weather station readings:

CREATE TABLE weather_data_by_date (  month BIGINT,  day BIGINT,  station_id UUID,  time timestamp,  temperature DOUBLE,  wind_speed DOUBLE,  PRIMARY KEY ((month,day),station_id,time));

In this model, the month and day keys are used to make up a composite partition key. The clustering keys are station_id and time. In this way, for each partition, the number of cells will be equal to the total unique combinations of tuples:

  • station_id, time, temperature
  • station_id, time, wind_speed

Understanding a cell comes into play ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Apache Cassandra - Second Edition

Mastering Apache Cassandra - Second Edition

Nishant Neeraj

Publisher Resources

ISBN: 9781789131499Supplemental Content