Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Apache Cassandra

You're reading from   Learning Apache Cassandra Build an efficient, scalable, fault-tolerant, and highly-available data layer into your application using Cassandra

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781783989201
Length 246 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Matthew Brown Matthew Brown
Author Profile Icon Matthew Brown
Matthew Brown
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Up and Running with Cassandra FREE CHAPTER 2. The First Table 3. Organizing Related Data 4. Beyond Key-Value Lookup 5. Establishing Relationships 6. Denormalizing Data for Maximum Performance 7. Expanding Your Data Model 8. Collections, Tuples, and User-defined Types 9. Aggregating Time-Series Data 10. How Cassandra Distributes Data A. Peeking Under the Hood B. Authentication and Authorization Index

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 quite a few cells in alice's wide row, but we're particularly interested in those having to do with the starred_by_users column, which is a set:

Set columns in column families

Note that the cell names here look like the cell names in...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime