How to define dynamic columns in a column family in Kassandra?

We do not want to correct the definition of the columns when creating the column family, since we may have to insert new columns in the column family. Can this be achieved? I am wondering if it is possible to define column metadata when creating a column family, but specify a column when updating client data, for example:

CREATE COLUMN FAMILY products with default_validation_class = UTF8Type AND key_validation_class = UTF8Type AND comparator = UTF8Type; set products ['1001'] ['brand'] = 'Sony;

Thanks Fan

+1
source share
1 answer

Yes ... this can be achieved without even making any special effort. In the DataStax documentation, the Cassandra data model (a good read, by the way, along with the CQL spec ):

Cassandra's data model is an optional, column-oriented data model. This means that unlike a relational database, you do not need to model all the columns required by your application, since each row should not have the same set of columns. Columns and their metadata can be added by your application as needed, preventing your application from downtime.

+4
source

All Articles