Problem
When a transaction is executed, a DBMS will often need to update the contents of one or more tables in the database. The DBMS usually locks a table before its contents are updated. This is done so that the contents of the table are not changed by some other transaction before the changes from the first transaction are copied on to the storage device where the database is stored; otherwise the changes from one of the transactions could be lost. Once the change is written on the storage device, the DBMS will unlock the table and make it available for use by other transactions.
Because of locking, concurrency control becomes a difficult task. A database usually stores data from a transaction across multiple tables. For example, a product purchase transaction (transaction P) may update a Transaction_line table before an Order table; the DBMS will first lock the Transaction_line table and then lock the Order table. A product return transaction (transaction R) may try to update the Order table before the Transaction_line table, and the locking sequence could be reversed. In such cases, Transaction P may lock the Transaction_line table, but before it can lock the Order table, transaction R may have locked it. This leads to what is called a deadlock - it is resolved by the DBMS by requiring that all transactions unlock the corresponding tables after a suitably period of time has elapsed.
Given this background, can you suggest what makes ensuring the ACID requirements difficult for NoSQL databases?