How Data is Updated in Cassandra?

Category: Cassandra   Tags: Cassandra, Learning, Beginners, Basics, NoSQL Database

When you insert a new row in Cassandra, it is added to the database without checking on whether a duplicate record exists. Therefore if a row with same primary key exist, it will be updated otherwise a new row will be created. This process is called upsert.

Cassandra use compaction to merge smaller SSTables into larger SSTables and if during this process two or more versions of the same row is found, Cassandra only writes the most recent version to the new SSTable.