Explain the difference between a nonrepeatable read and a phantom. Specifically, give an example of a schedule of the SQL statements of two transactions that illustrate the two cases. Specify an isolation level in each case.
What will be an ideal response?
To illustrate a non-repeatable read consider two transactions running at READ COMMITTED:
SELECT1(get sum of balances in all of Mary’s accts);
UPDATE2(post interest in all accts);
Commit2;
SELECT1(get sum of balances in all of Mary’s accts);
To illustrate a phantom consider two transactions running at REPEATABLE READ:
SELECT1(get sum of balances in all of Mary’s accts);
INSERT1(newaccount for Mary);
COMMIT2;
SELECT1(get sum of balances in all of Mary’s accts);
In the first case, the second SELECT returns the same set of tuples as the first, but their values have changed. In the second case, the second SELECT returns a newtuple that satisfies the read predicate, but the values of the old tuples that satisfy that predicate have not changed.
You might also like to view...
An example of a producer/consumer relationship is ________.
a) an application that copies data from a fixed-size buffer to a CD-RW b) a word processor that sends data to a buffer to be printed c) both a and b d) none of the above
If you are installing an access point on a ceiling, but find there are no electrical outlets nearby to provide power to the AP, what technology should you deploy?
A. WCN B. SoftAP C. POE D. Virtual Wifi
________ track loan payments over the life of a loan
Fill in the blank(s) with the appropriate word(s).
When looking at a statistics table, what is one way to drill down to see the underlying events?
A. Creating a pivot table. B. Clicking on the visualizations tab. C. Viewing your report in a dashboard. D. Clicking on any field value in the table.