Cassandra Tutorial
Cassandra Keyspace Operations
Cassandra Table Operations
Cassandra CURD Operations
Cassandra CQL Types
Cassandra Useful Resources
Selected Reading
- Cassandra - Shell Commands
- Cassandra - Cqlsh
- Cassandra - Referenced Api
- Cassandra - Installation
- Cassandra - Data Model
- Cassandra - Architecture
- Cassandra - Introduction
- Cassandra - Home
Cassandra Keyspace Operations
Cassandra Table Operations
- Cassandra - Batch
- Cassandra - Drop Index
- Cassandra - Create Index
- Cassandra - Truncate Table
- Cassandra - Drop Table
- Cassandra - Alter Table
- Cassandra - Create Table
Cassandra CURD Operations
Cassandra CQL Types
Cassandra Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Cassandra - CQL Datatypes
Cassandra - CQL Datatypes
CQL provides a rich set of built-in data types, including collection types. Along with these data types, users can also create their own custom data types. The following table provides a pst of built-in data types available in CQL.
Data Type | Constants | Description |
---|---|---|
ascii | strings | Represents ASCII character string |
bigint | bigint | Represents 64-bit signed long |
blob | blobs | Represents arbitrary bytes |
Boolean | booleans | Represents true or false |
counter | integers | Represents counter column |
decimal | integers, floats | Represents variable-precision decimal |
double | integers | Represents 64-bit IEEE-754 floating point |
float | integers, floats | Represents 32-bit IEEE-754 floating point |
inet | strings | Represents an IP address, IPv4 or IPv6 |
int | integers | Represents 32-bit signed int |
text | strings | Represents UTF8 encoded string |
timestamp | integers, strings | Represents a timestamp |
timeuuid | uuids | Represents type 1 UUID |
uuid | uuids | Represents type 1 or type 4 |
UUID | ||
varchar | strings | Represents uTF8 encoded string |
varint | integers | Represents arbitrary-precision integer |
Collection Types
Cassandra Query Language also provides a collection data types. The following table provides a pst of Collections available in CQL.
Collection | Description |
---|---|
pst | A pst is a collection of one or more ordered elements. |
map | A map is a collection of key-value pairs. |
set | A set is a collection of one or more elements. |
User-defined datatypes
Cqlsh provides users a facipty of creating their own data types. Given below are the commands used while deapng with user defined datatypes.
CREATE TYPE − Creates a user-defined datatype.
ALTER TYPE − Modifies a user-defined datatype.
DROP TYPE − Drops a user-defined datatype.
DESCRIBE TYPE − Describes a user-defined datatype.
DESCRIBE TYPES − Describes user-defined datatypes.