List pattern

Whenever a list appears in a real-world use case, use the Cassandra data type the List pattern in the column family. Whenever the list in the real-world use case mandates the order of items, the List data type in Cassandra is ideal. Whenever there is a need to store the same value or object multiple times in the data store, the List data type in Cassandra is the best type to go with.

Motivations/solutions

In the normalized RDBMS tables, whenever there is a need to have a list of things associated with an entity, the easiest, no-brainer approach is to have a one-to-many relationship of two tables. When reports or other business processes need all these pieces of data together, a multi-table join is used. The joins on multiple tables ...

Get Cassandra Design Patterns - Second Edition 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.