When lines are overwritten in cassandra

My understanding is that rows are overwritten when another row with identical primary keys is inserted.

For instance:

I have columns (user_id int, item_id int, site_id int), and minePRIMARY KEY(user_id, item_id)

If I had the following table:

user_id, item_id, site_id
   2       3        4

and I insert user_id : 2, item_id : 3, site_id : 10, my new table will be:

user_id, item_id, site_id
   2       3        10

not

user_id, item_id, site_id
   2       3        4
   2       3        10

Is this simple case true in all cases? Are there any subtleties that I probably don't know? In addition, I could not find it in the documents and came to this conclusion, playing with cassandra, can anyone provide a source for the document?

+4
source share
1 answer

, . , UPDATE INSERT, ( ), , . , UPDATE INSERT . , , , , .

, , . ​​ :

UPDATE:

, , . WHERE, , .... UPDATE SET .

INSERT:

, , .... , . , .

, " , ", Planet Cassandra, : Upsert

Cassandra - , , INSERT UPDATE , . , , . , , .

+10

All Articles