Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In each of the following scenario, please indicate which properties in ACID properties is violated, and given explanation together with a solution to avoid this
- In each of the following scenario, please indicate which properties in ACID properties is violated, and given explanation together with a solution to avoid this situation.
- Thread A is updating 2 records in DB, after updating 1st record and before updating the 2nd record, Thread B is updating the 1st record and overwrite the value that write by Thread A.
ACID properties violated |
|
Explanation |
|
Solution |
|
- Thread A is inserting 2 records into 2 different tables in DB by batch. However, due to inserting duplicate key into 2nd table, insertion of 2nd record failed. But insertion of 1st record succeed and record of 1st insertion can be queried out by other thread.
ACID properties violated |
|
Explanation |
|
Solution |
|
- A thread writes a record to memory but encounter program Exception, the program terminates accidentally. After program restart, the change of record is lost.
ACID properties violated |
|
Explanation |
|
Solution |
|
- The business logic state that an account must owned by a customer. There are customers and accounts tables in database to reflect this business logic. However, some accounts records cannot map to any record in customers table.
ACID properties violated |
|
Explanation |
|
Solution |
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started