Answered step by step
Verified Expert Solution
Link Copied!

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

  1. 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.
  1. 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

  1. 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

  1. 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

  1. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

What is management growth? What are its factors

Answered: 1 week ago