Search icon CANCEL
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
Cassandra Design Patterns

You're reading from   Cassandra Design Patterns Build real-world, industry-strength data storage solutions with time-tested design methodologies using Cassandra

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785285707
Length 168 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rajanarayanan Thottuvaikkatumana Rajanarayanan Thottuvaikkatumana
Author Profile Icon Rajanarayanan Thottuvaikkatumana
Rajanarayanan Thottuvaikkatumana
Arrow right icon
View More author details
Toc

Set pattern

Whenever there is a set in a real-world use case, use the Cassandra data type Set in the column family. Whenever the set in the real-world use case does not mandate the order of items, and if the items don't repeat, the Set data type in Cassandra is ideal. In the applications, even if the duplicate check is relaxed, since the Set data type cannot handle duplicate items, it will not take duplicate items.

Motivations/solutions

In the normalized RDBMS tables, whenever there is a need to have a set of things associated with an entity, the easiest and the most straightforward approach is to have a one-to-many relationship of two tables. When the reports or other business processes need all these pieces of data together, a multi-table join is used. The joins on multiple tables always perform badly when the number of records on the tables is very large. This affects the read performance as well as the write performance. The performance is affected because of two reasons. One, as...

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 €18.99/month. Cancel anytime