User-defined types

Using a tuple column to group educational information into a single column has several advantages, but there's also something missing. The education column comprises two components: the first, a string, is the name of an educational institution, and the second, an integer, is a graduation year. As the developers of the MyStatus application, we know what the two components of the tuple represent; however, this knowledge is not made explicit anywhere in the database definition.

To solve this problem, we can instead use a user-defined type. User-defined types are very similar to tuples, except that each component has a name. This makes it easier for application developers to easily infer the intent of a user-defined type. As we'll ...

Get Learning Apache Cassandra 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.