Tuple Data Type
Explore the Tuple data type for compactly grouping related data within a single column, and understand the key differences between Tuples and User-Defined Types (UDTs).
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 UDT
s, 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
...