October 2018
Beginner to intermediate
348 pages
10h
English
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:
Understanding a cell comes into play ...