Why is Theorem C in CAP not the same as C in ACID?

My question is quite simple, I was looking for a simpler answer: why is C in the CAP theorem not the same as C in ACID?

Read this HN thread.

Update

Hitchhiking on NOSQL v1.0 , slide 71 says: C in CAP = A + C (Atomic Consistency)

+4
source share
2 answers

Both Cs maintain consistency, but the concept of consistency in CAP means that "all nodes see the same data at the same time," and the concept of consistency in ACID means that "any transaction executed by the database will accept it from one consistent state to another" . (From Wikipedia.)

+3
source

You can hardly have a meaningful sequence without atomicity. This is why the CAP theorem defines C the way it does.

Imagine this simple scenario:

There is a database with two accounts. There is no money in our database. Just money on two accounts. In the database, money is transferred between one account to another.

Without atomicity, the user could read data when money was deducted from one account, while it was not yet written by another. In this case, the total amount of the two accounts will be different from the read one in order to read, which should be impossible, since the "new" money does not go or go to the database.

To talk about consistency in any other way is to think that Java boolean is โ€œalmostโ€ true, while the rest of the world reads it as false.

+1
source

Source: https://habr.com/ru/post/1337262/


All Articles