The data model
The data model for Cassandra is column- family- based, which resembles the design for relational databases using tables. In this case, however, the data model works in a fundamentally different manner to fixed- size columns. In Cassandra, the database schema is not required to be fixed before the application is used— and it can actually be updated on the fly without any problems on the server. In most cases, the client can arbitrarily determine the number of columns and metadata it wants to store in a particular column family. This results in much more flexibility for the application and in rows that vary in size and in the number of columns.
.HysSDFHs DUH usHG WR GHfiQH WhH QDPHsSDFH IRU HDFh DSSOLFDWLRQ’s FROuPQ IDPLOLHs. +HQFH, WhHsH FDQ EH GHfiQHG RQ D per-application basis, or according to any other schema design that is required. Column families can be of two types— static and dynamic. ThH sWDWLF FROuPQ IDPLOy DOORws SUHGHfiQHG columns in which a value may or may not be stored. Dynamic column families, on the other hand, allow the application WR GHfiQH FROuPQs whHQHYHU WhHy DUH QHHGHG DFFRUGLQJ WR their usage. While specifying a column, its name, value and timestamp are needed. So basically, a column is the most basic unit in which a piece of information can be stored. Cassandra also supports structures like super columns and composite columns, which allow for further nesting.
Almost all RDBMS' require you to specify a datatype for each column. Though Cassandra does not have any such sWURQJ UHTuLUHPHQWs, LW DOORws sSHFLfiFDWLRQ RI FRPSDUDWRUs and validators, which act like a datatype for the column name and the column’s value, respectively. Except for counters, DOPRsW DOO GDWDWySHs OLNH LQWHJHU, flRDW, GRuEOH, WHxW, BRROHDQ, etc, can be used for comparators and validators.