/plushcap/analysis/datastax/datastax-collections-cassandra

Collections in Cassandra

What's this blog post about?

The text discusses data modeling in Apache Cassandra, focusing on the use of collection data types and user-defined types (UDTs). It explains that using collections can be more efficient when storing small lists of tags associated with videos. The five collection data types in Cassandra are: set, list, map, tuple, and UDT. When defining a collection, users need to provide a data type for its elements. CQL provides convenient syntax for inserting, updating, or deleting items in collections. UDTs offer flexibility by allowing multiple data fields with names and types to be attached to a single column. An example is provided where an address type is created and used across multiple Cassandra tables. The frozen keyword is required when using UDTs inside of collections, forcing Cassandra to treat the address as a single value.

Company
DataStax

Date published
Nov. 8, 2019

Author(s)
Robin Schumacher

Word count
325

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.