Presentation is loading. Please wait.

Presentation is loading. Please wait.

Managing Multi-User Databases AIMS 3710 R. Nakatsu.

Similar presentations


Presentation on theme: "Managing Multi-User Databases AIMS 3710 R. Nakatsu."— Presentation transcript:

1 Managing Multi-User Databases AIMS 3710 R. Nakatsu

2 Chapter 12 Multi-User Issues Transaction Management Database Recovery Database Administration

3 Chapter 12 Transaction Processing What is a transaction? A transaction is a logical unit of work that must be entirely completed or aborted; no intermediate states are accepted. A transaction may consist of a series of related UPDATE (or writes) to the database.

4 Chapter 12 Transaction: Example Scenario: A company makes a credit sale of a product to a customer. 1. Generate an order on the Order table to record the order. 2. Update the Inventory table by subtracting the number of units of the product sold from the quantity-on-hand. 3. Update the Account Receivable table to bill the customer later. If the three transactions are not completely executed, the transaction will yield an inconsistent database

5 Chapter 12 Transaction Management with SQL Two commands are useful to know: 1. COMMIT: When this statement is issued, the changes are permanently recorded in the database. 2. ROLLBACK: When this statement is reached, the changes are aborted, and the database is “rolled back” to its previous consistent state.

6 Chapter 12 Database Recovery The process of restoring the database to a correct state in the event of a failure. Via Reprocessing Via Rollback/Rollforward (Undo/Redo)

7 Chapter 12 Recovery Facilities Backup Facilities: make periodic backup copies of the database Logging Facilities: keep track of all updates made to the database Checkpoint Facilities: maintain a point of synchronization between the database and the transaction log

8 Chapter 12 Transaction Log Transaction records contain: Transaction identifier Time Type of transaction (transaction start, insert, update, delete, abort, commit) Identifier of data item affected Before-image of the data item After-image of the data item Log management information (such as pointers to previous and next log records for the transaction)

9 Chapter 12 Checkpoint The point of synchronization between the database and the transaction log file. All buffers are force-written to secondary storage. Checkpoints involve the following operations: 1.All log records in main memory are written to secondary storage. 2.A checkpoint record is written to the log file. The record contains the identifers of all active transactions at the time the checkpoint is taken.

10 Chapter 12 Checkpointing Example TTa T1 T2 T4 T5 T6 T3 t0t0 tFtF tCtC

11 Chapter 12 Fault-Tolerant Computer Systems… are systems that contain extra hardware, software, and power supply components that can back up a system and keep it running continuously to prevent system failure.

12 Chapter 12 Technologies used to ensure maximum performance Load balancing distributes large numbers of access requests across multiple servers. Mirroring uses a backup server that duplicates all the processes and transactions of the primary server. Clustering links two computers together so that the second computer can act as a backup to the primary computer.

13 Chapter 12 RAID (Redundant Array of Independent Disks) Technology that provides enhanced performance and reliability through redundancy Replicates data among multiple disk drives Question: Does RAID replace the need for backups?

14 Chapter 12 Database Administration (DBA) The overall responsibility of the DBA is to facilitate the development and use of the database. DBA database administrator –manages the database structure –controls concurrent processing –develops database security –provides for database recovery –manages the DBMS

15 DBA Must Monitor DBMS Performance © 2000 Prentice Hall

16 Chapter 12 Features of Multi-User DBMS Products Support for SQL and other open standards Support for transaction processing (commits and rollbacks) Transaction logging for quick recovery Security management Programmability (the ability to create customized applications) Support for DBA functions (e.g., performance tuning and query optimization)


Download ppt "Managing Multi-User Databases AIMS 3710 R. Nakatsu."

Similar presentations


Ads by Google