Skip to Main Content
Apache Cassandra Essentials
book

Apache Cassandra Essentials

by Nitin Padalia
November 2015
Beginner to intermediate content levelBeginner to intermediate
172 pages
3h 47m
English
Packt Publishing
Content preview from Apache Cassandra Essentials

Data types

Cassandra has five categories or data types:

  1. Native types: These are built-in types in Cassandra. For each type there is a keyword to define.
  2. Collection types: These types can store a group of native type elements. There are three categories—set, list, and map.
  3. Tuple types: Tuple types can store a fixed length group of elements in a column similar to user-defined types, except that the tuple element field has no names. Hence, the ordering should be the same as during inserting a record in the order they are defined at table creation time. The following is an example of creating a column family with a tuple type:
    CREATE TABLE user_reviews ( useriduuid PRIMARY KEY, review frozen<tuple<text, text, decimal>> ) INSERT INTO user_reviews (userid, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Apache Cassandra - Second Edition

Mastering Apache Cassandra - Second Edition

Nishant Neeraj
Learning Apache Cassandra - Second Edition

Learning Apache Cassandra - Second Edition

Sandeep Yarabarla, Graham Doman

Publisher Resources

ISBN: 9781783989102