Collection columns in column families

We've seen the surprising way in which the key structure of a CQL table maps to the underlying column family representation, but so far the values stored in CQL have mapped completely transparently into cell values at the column family level. While this is true for scalar data types, something much more interesting happens where collections are concerned.

Set columns in column families

We'll start by looking at sets, which are the simplest of the three collection column types. Let's take a look at alice's row in the user_status_updates column family:

GET user_status_updates['alice'];

Recall that, by only using the bracket operator once in the GET statement, we'll retrieve all cells in the alice RowKey.

There are ...

Get Learning Apache Cassandra now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.