ACID properties. Kim and Vic look together for new hardware and find on the site MiBuy.co.nz a great combo for the well-known tablet Pad351 together with a matching keyboard Key751. Kim successfully purchases one combo Pad351 plus Key751. Vic tries to buy another combo, but while waiting for confirmation, the site MiBuy.co.nz crashes.
When MiBuy.co.nz comes online again, Kim’s order has disappeared in the system, and Vic has a confirmed order only for a Key751, without matching Pad351, in the system.
ACID property description:
Atomicity: either all of the operations of a transaction are made durable or none of them are.
Consistency: after the transaction, the database is in a consistent state.
Isolation: operations in a transaction appear isolated from all other operations. Transactions have a virtual serial view on the system.
Durability: once the user has been notified of success, the transaction will persist, and not be undone.
Question: For each of the 3 ACID properties excluding consistency: Say whether the
MiBuy.co.nz system clearly violated this ACID property.
Atomicity, Isolation, and Durability are all violated in this situation. Vic’s half-completed transaction is a violation of Atomicity. Durability is violated when Kin’s order is canceled despite receiving a success message. Vic’s trade had an impact on Kin’s, breaking the isolation.
- Atomicity, Consistency, Isolation, and Durability are the ACID qualities.
- According to the Atomicity property, when a transaction is completed, either all of the transaction’s operations are completed successfully or none of them are completed.
- It should not leave any transactions unfinished.
- The database should be in a consistent condition after each transaction, according to the Consistency attribute.
5. Operations in a transaction should be isolated from all other operations, according to the Isolation attribute.
6. Once the user is notified of a successful transaction, it should persist and not be undone, according to the Durability attribute.
7. Kim and Vic desire to buy a tablet Pad351 and a matching keyboard Key751 in the given scenario. Kim was able to purchase the combo and received a notification indicating that the transaction was successful.
8. Vic tries to purchase another, but the website crashes.
9. Vic’s request was not totally successful when the website responded; he desired a combination of Pad351 and Key751.
10. However, only key751 without Pad351 was ordered.
11. This indicates a transaction that isn’t complete.
12. According to Atomicity, a transaction’s operations must either be completed or undone. Should not be left unfinished.
13. Only half of the deal has been completed. As a result, Atomicity is violated. In the Isolation, there is also a blatant violation.
14. One transaction should not affect the other due to perp isolation. In this case, Vin’s order interfered with Kin’s and caused his order to be canceled.
15. There is also a blatant infringement of Durability.
16. The transaction can’t be undone once the user receives an order success notification, according to the durability. Kin’s order was canceled even after he was told of a success message.
17. As a result, it is illegal.