Chapter Objectives
In this chapter, you will learn to:
• understand the concepts of transactions, recovery, and concurrency control;
• identify the various steps of a transaction lifecycle as well as the DBMS components involved and the role of the logfile;
• discern different types of failures and how to deal with them;
• understand different types of concurrency problems as well as the importance of schedules, serial schedules, and serializable schedules;
• discern the differences between optimistic and pessimistic schedulers;
• grasp the importance of locking and locking protocols;
• understand the responsibility of the DBMS's transaction management facilities to ensure the ACID properties of a transaction.
Opening Scenario
Since many users will interact simultaneously with Sober's database, the company wants to understand any problems that may occur. Furthermore, Sober also wants to mitigate the risks of various types of failures that may make its data incorrect.
The majority of databases in actual organizational settings are multi-user databases. This implies that many applications and users can access the data in the database in parallel. This concurrent access to the same data, if not managed properly, may induce different types of anomalies or unexpected problems. Moreover, various kinds of errors or calamities may occur in the respective DBMS components or its environment – such as the operating system, the applications interacting with the DBMS, or the storage subsystem – possibly rendering the database data into an inconsistent state. Fortunately, most database systems provide a realm of transparent, although often configurable, solutions to avoid or otherwise deal with such problems. In this way, the DBMS supports the ACID (Atomicity, Consistency, Isolation, Durability) properties already mentioned in Chapter 1. At the heart of these solutions are the concepts of transactions and transaction management, recovery, and concurrency control. In this chapter, we first introduce each of these concepts. Then, we focus in more detail on transaction management and the DBMS components involved. After that, we discuss recovery and the different techniques to deal with calamities in the DBMS or application program, as well as the storage media. Finally, we describe in detail how concurrency control techniques, in interplay with transaction management and recovery, guarantee seamless concurrent access by multiple users to shared data.
Review the options below to login to check your access.
Log in with your Cambridge Higher Education account to check access.
If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.