Now that we know a bit more about Cassandra and its architecture, let's dive into data modeling. Cassandra supports both dynamic and static/fixed column names:
Fixed columns: Similar to the RDBMS table structure, Cassandra defines (explicitly created during the table creation), validates, and inserts columns ahead of time. Secondary indexes can also be created on them. There are cases where this model has advantages, such as where the data store is shared between multiple applications and the data needs to be validated before it is inserted.
Note
The column names still need to be of the same type. The Cassandra data storage structure is very different from traditional databases; when a column is not there, instead of storing a null value, Cassandra doesn't store the column at all.
CREATE TABLE users ( user_idint PRIMARY KEY, name varchar, address varchar, rank int, score int );
Dynamic columns: The power of Cassandra is the BigTable data structure where any row in the database...