Summary
In this chapter, we've explored data access patterns for compound primary key tables, and used our new knowledge to expose a paginated view of a user's most recent status updates. We discussed how to query range slices of clustering column values, and how to reverse the clustering order at both table creation time and query time. We reinforced our understanding of the CQL SELECT
queries by performing the intricate task of paginating over all the rows in our status updates table, and then applied our new compound primary key toolkit to a totally different problem, the autocompletion of hashtags.
In Chapter 5, Establishing Relationships, we will apply our techniques for compound primary key data modeling to the task of describing relationships that do not have the clear parent-child structure of users and status updates. We'll also go beyond primary key-based data access, exploring the use of secondary indexes to look up data using any column we wish.