Question

In: Computer Science

Discuss why the COMMIT and ROLLBACK statements are necessary, and explain their relationship to one of...

Discuss why the COMMIT and ROLLBACK statements are necessary, and explain their relationship to one of the transaction properties. Discuss all four possible concurrency problems and provide examples of each.

Solutions

Expert Solution

Why commit is necessary

COMMIT is necessary to permantly store the changes done after the transaction done and to end the transaction that it is completed

Why rollback is necessary

ROLLBACk is necessary in transaction suppose some error occured during transaction by human errror or machine error then ROLLBACK command is executed to restore all the data to previos condition, without it there may many exception will occur.

Their relationship to Atomicity (transaction property)

In atomicity data is operated as a single operation that is all changes are mode or none of them are made.

so commit and rollback ensure that Atomicity of the transaction remain maintain during any transaction.

PROBLEMS in concurrency

Multi-User

Example: In this problem suppose two person requested same data but one is for readin and other one is for writing then the data is reflected to first one and he/she read the outdated data.

Uncommited data

Example: This occur whe two transaction T1 and T2 executed at same time and T1 is rolled back after T2 already reads the uncommited data.

Inconsistent Data

Example: This happen when T1 is calculating over some data meanwhile T2 is updating the same data, this result to the inconsistent data to T1

Lost Data Updates

Example: This happen when T1 and T2 updating the same data at same time and update from one transaction is overwritten by other.


Related Solutions

Why are the COMMIT and ROLLBACK statements necessary? Explain their relationship to one of the transaction...
Why are the COMMIT and ROLLBACK statements necessary? Explain their relationship to one of the transaction properties. Explain all four possible concurrency problems and provide examples of each. typed please
Explain the purpose of the worksheet. Why is it necessary to prepare formal financial statements if...
Explain the purpose of the worksheet. Why is it necessary to prepare formal financial statements if all of the data are in the statement columns of the worksheet?
What is sleep and why is it necessary for health, discuss the possible effects of one...
What is sleep and why is it necessary for health, discuss the possible effects of one sleep disorder on an individual's day-to-day functioning?Use symptom details, statistics, and treatments to support your reasoning.
When reporting, why is it necessary to provide evidence to support your statements or conclusions? Discuss...
When reporting, why is it necessary to provide evidence to support your statements or conclusions? Discuss in 80–100 words.
Explain why it is necessary to select only one wavelength to pass through the sample (i.e....
Explain why it is necessary to select only one wavelength to pass through the sample (i.e. why don’t we just shine white light into the sample and measure the amount of light that passes through?)
Discuss the motives of the executives to commit fraud. Discuss the culpability of the accountants in...
Discuss the motives of the executives to commit fraud. Discuss the culpability of the accountants in preparing the questionable accounting estimates for the cost to compete.
Why is it necessary to prepare formal financial statements if all of the data are in...
Why is it necessary to prepare formal financial statements if all of the data are in the statement columns of the worksheet? Identify the account(s) debited and credited in each of the four closing entries, assuming the company has net income for the year. Distinguish between a reversing entry and an adjusting entry. Are reversing entries required? Indicate, in the sequence in which they are made, the three required steps in the accounting cycle that involve journalizing. Identify, in the...
Financial statements and their relationship. Discuss the basic financial statements and how they are interrelated. Include...
Financial statements and their relationship. Discuss the basic financial statements and how they are interrelated. Include a discussion about the eight concepts underlying financial reporting.
Mankiw) Explain why each of the following statements is true. Discuss the impact of monetary and...
Mankiw) Explain why each of the following statements is true. Discuss the impact of monetary and fiscal policy in each of these special cases. a.If investment does not depend on the interest rate, the IS curve is vertical. b.If money demand does not depend on the interest rate, the LM curve is vertical. c.If money demand is extremely sensitive to the interestrate, the LM curve is horizontal
Discuss the capital budget process and why it is necessary to do in healthcare. Discuss briefly...
Discuss the capital budget process and why it is necessary to do in healthcare. Discuss briefly the steps of this process.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT