0% found this document useful (0 votes)
253 views

Transactions: Practice Exercises

This document provides practice exercises and solutions for Chapter 17 on transactions from a database textbook. It includes questions about recovery managers, file systems, ACID properties, storage types for durability, conflict serializability vs view serializability, cascadeless schedules, isolation levels and anomalies like lost updates, and analyzing schedules for serializability. It also includes a figure showing a precedence graph for one of the practice exercises.

Uploaded by

Divyanshu Bose
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
253 views

Transactions: Practice Exercises

This document provides practice exercises and solutions for Chapter 17 on transactions from a database textbook. It includes questions about recovery managers, file systems, ACID properties, storage types for durability, conflict serializability vs view serializability, cascadeless schedules, isolation levels and anomalies like lost updates, and analyzing schedules for serializability. It also includes a figure showing a precedence graph for one of the practice exercises.

Uploaded by

Divyanshu Bose
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CHAPTER

17
Transactions

Solutions for the Practice Exercises of Chapter 17

Practice Exercises

17.1 Suppose that there is a database system that never fails. Is a recovery manager
required for this system?
17.2 Consider a file system such as the one on your favorite operating system.
a. What are the steps involved in the creation and deletion of files and in
writing data to a file?
b. Explain how the issues of atomicity and durability are relevant to the
creation and deletion of files and to writing data to files.
17.3 Database-system implementers have paid much more attention to the ACID
properties than have file-system implementers. Why might this be the case?
17.4 What class or classes of storage can be used to ensure durability? Why?
17.5 Since every conflict-serializable schedule is view serializable, why do we em-
phasize conflict serializability rather than view serializability?
17.6 Consider the precedence graph of Figure 17.16. Is the corresponding schedule
conflict serializable? Explain your answer.
17.7 What is a cascadeless schedule? Why is cascadelessness of schedules desir-
able? Are there any circumstances under which it would be desirable to allow
noncascadeless schedules? Explain your answer.
17.8 The lost update anomaly is said to occur if a transaction Tj reads a data item,
then another transaction Tk writes the data item (possibly based on a previous
read), after which Tj writes the data item. The update performed by Tk has
been lost, since the update done by Tj ignored the value written by Tk .
59
60 Chapter 17 Transactions

a. Give an example of a schedule showing the lost update anomaly.


b. Give an example schedule to show that the lost update anomaly is possi-
ble with the read committed isolation level.
c. Explain why the lost update anomaly is not possible with the repeatable
read isolation level.
17.9 Consider a database for a bank where the database system uses snapshot iso-
lation. Describe a particular scenario in which a nonserializable execution oc-
curs that would present a problem for the bank.
17.10 Consider a database for an airline where the database system uses snapshot
isolation. Describe a particular scenario in which a nonserializable execution
occurs, but the airline may be willing to accept it in order to gain better overall
performance.
17.11 The definition of a schedule assumes that operations can be totally ordered
by time. Consider a database system that runs on a system with multiple pro-
cessors, where it is not always possible to establish an exact ordering between
operations that executed on different processors. However, operations on a
data item can be totally ordered.
Does this situation cause any problem for the definition of conflict serializ-
ability? Explain your answer.

T1 T2

T4 T3

T5

Figure 17.16 Precedence graph for Practice Exercise 17.6.

You might also like