Search code examples
database-designcassandradatastaxdatastax-enterprise

to alter or create a new table in cassandra to add new columns


I am using DSE cassandra.

I wanted to add new attributes to the existing table.

I wanted to know what is the best practice to achieve this? Should i be adding new columns to existing table or creating new table?

What are the pros and cons for either approach?


Solution

  • Adding columns is fine. See the ALTER statement. Unless you need to change your primary key, you should not need to create/migrate to a new table.