O'Reilly logo

Cassandra Design Patterns - Second Edition by Rajanarayanan Thottuvaikkatumana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time series pattern

In an IoT application with Cassandra as the data store, a time series can be modeled with the timestamp or timeuuid data types in conjunction with an appropriate data type for the data points. Corresponding to each data point, a time data type is to be used. In this design pattern, a timestamp or timeuuid data type column must not be used as the single partition key because there will be only one data point per row. There should be at least one associated timestamp or timeuuid for each of the data points. It is ideal to choose a meaningful partition key so that the Cassandra CQL queries return data points in a given period without reading multiple rows. It is ideal to store all the most commonly needed records in one big row ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required