Database Reference
In-Depth Information
Accept order data from browser.
Read CUSTOMER and SALESPERSON records.
Change CUSTOMER and SALESPERSON records.
Rewrite CUSTOMER record.
Rewrite SALESPERSON record.
Insert new ORDER record.
(Log records written here)
****CRASH****
(a) Processing with Problem
Database with
new CUSTOMER,
SALESPERSON,
and ORDER
records
Before images of
CUSTOMER and
SALESPERSON
records
Recovery Processor
(Applies before images of
CUSTOMER and SALESPERSON
and removes new ORDER record)
Database with
ORDER
transaction
removed
Figure 9-19
recovery Example
(b) Recovery Processing
requests, and writes its buffers to disk. The DBMS then waits until the operating system noti-
fies it that all outstanding write requests to the database and to the log have been successfully
completed. At this point, the log and the database are synchronized. A checkpoint record is
then written to the log. Later, the database can be recovered from the checkpoint and only
after images for transactions that started after the checkpoint need be applied.
Checkpoints are inexpensive operations, and it is feasible to take three or four (or more)
per hour. In this way, no more than 15 or 20 minutes of processing need to be recovered. Most
DBMS products perform automatic checkpoints, making human intervention unnecessary.
You will see specific examples of backup and recovery techniques for SQL Server, Oracle
Database, and MySQL in the next three chapters. For now, you only need to understand the
basic ideas and to realize that it is the responsibility of the DBA to ensure that adequate
backup and recovery plans have been developed and that database saves and logs are
generated as required.
Managing the DBMS
In addition to managing data activity and the database structure, the DBA must manage the
DBMS itself. The DBA should compile and analyze statistics concerning the system's performance
and identify potential problem areas. Keep in mind that the database is serving many user groups.
The DBA needs to investigate all complaints about the system's response time, accuracy, ease of
use, and so forth. If changes are needed, the DBA must plan and implement them.
 
 
Search WWH ::




Custom Search