CodesJava

Easy learning with example program codes

Data Types in Cassandra

Cassandra Data Types:

Below is a list of various data types supported in Cassandra.

TYPEUSES
ASCIIUsed for US-ascii character string.
BIGINTUsed for 64-bit signed long.
BLOBUsed for Arbitrary bytes in hexadecimal.
BOOLEANUsed for True or False.
COUNTERUsed for Distributed counter values 64 bit.
DECIMALUsed for Variable precision decimal.
DOUBLEUsed for 64-bit floating point.
FLOATUsed for 32-bit floating point.
FROZENUsed to store cassandra types.
INETUsed for IP address in ipv4 or ipv6 format.
INTUsed for 32 bit signed integer.
LISTUsed for Collection of elements.
MAPUsed for JSON style collection of elements.
SETUsed for Collection of elements.
TEXTUsed for UTF-8 encoded strings.
TIMESTAMPUsed for ID generated with date plus time.
TIMEUUIDUsed for Type 1 uuid.
TUPLEUsed for a group of 2,3 fields.
UUIDUsed for Standard uuid.
VARCHARUsed for UTF-8 encoded string.
VARINTUsed for Arbitrary precision integer.

Cassandra Automatic Data Expiration:

Data in Cassandra can automatically expire. For this, the user needs to specify the ‘TTL’ value in seconds, during data insertion, which is the time to live value for the data, after which the data automatically gets eliminated.

 

Please follow and like us:
error









Copyright © 2019 CodesJava DMCA.com Protection Status