Home > OS >  Is Consistency is responsible for not allowing users to see data which is not committed in ACID?
Is Consistency is responsible for not allowing users to see data which is not committed in ACID?

Time:03-10

Which property gives assurance that multiple data readers won't see uncommitted data?

A. Isolation
B. Atomicity
C. Consistency
D. Durability 

I believe the answer is C. Consistency . Am i correct ?

I would like to know examples

CodePudding user response:

Which property gives assurance that multiple data readers won't see uncommitted data?

Rephrasing a little the question:

Which property gives the assurance that a write done by one transaction will not be visible to new transactions until that transaction is committed?

That is isolation.

Isolation also enables consistency, that is if you have a property such as "every user has one and only one bank account", then in the isolation mode called "read-uncommited", during a transaction that deletes a bank account and add another bank account to an user, in other words that replace a bank account with another, it is possible that other transactions see one user with two bank accounts. That is impossible in the isolation mode called snapshot.

With snapshot isolation, given a consistent database, given isolation of every transactions, each transaction will see consistent data.

All in all, ACID properties are interleaved in one place or another. That is useful to reason and explain stuff, but you need to pin a particular use-case to tell what ACID property or properties are involved.

I recommend reading Bernstein paper called 'Concurrency Control in Distributed Database Systems'

  • Related