Cassandra Basic Types
Basic types are the foundation of data types, used to represent data in variables or tables. In Cassandra, basic types include:
- Numbers (INT, UNIQUEINT, SMALLINT, TINYINT): Used for storing integer values.
- Strings (TEXT, VARCHAR): Used for storing text data.
- Time (TIMESTAMP, DATE, TIME): Used for storing timestamps and dates.
- Booleans (BOOL): Used for storing true/false values.
Collection Types
Collection types are used to represent data structures containing multiple values. Common collection types in Cassandra include:
- Column family (CF): Used for storing a set of related column values, such as user information.
- SuperTable: Used for storing large amounts of data; this approach is generally not recommended as it may impact Cassandra performance.
User-Defined Types
User-Defined Types (UDT) are used to create more complex data structures. For example, you can create a UDT named "Person" that contains multiple attributes of basic types, such as name, age, and contact information.
These types in Cassandra are used to represent more complex data structures, which can improve the efficiency of writing SQL queries and provide a more flexible data storage method.