Tuple Data Type
Explore how to define and use tuple data types in Apache Cassandra. Learn to group multiple elements in a single column, understand insertion and update techniques, and compare tuples with user-defined types for effective data modeling.
We'll cover the following...
We'll cover the following...
The following diagram illustrates the various categories of data types offered by Apache Cassandra.
Tuples
Like UDTs, tuples also group related values together within a single column providing compact representation of data. Unlike UDTs, tuple elements are not named. Each element can have a different data type. The order of elements in a tuple is of key importance and must be remembered for data entry.
Tuples are defined using the following syntax, enclosing the tuple elements in angle brackets < >.
columnName TUPLE '<' cql_type (',' cql_type)* '>'
Syntax
...