Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using.

Similar presentations


Presentation on theme: "Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using."— Presentation transcript:

1 Unit 9 Transaction Processing

2 Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using transactions Identifying multiuser problems Detecting and clearing deadlocks Implementing locking Implementing transaction isolation

3 Distributed Database Terms Distributed database –Collection of shared data distributed over multiple databases in a computer network. Distributed DBMS –Software designed to manage and maintain distributed databases. Distributed processing –Application processing that involves multiple servers.

4 Distributed Database Sample Database Systems, Example 22.1, pg. 690

5 Distribute Database Points Global applications can access multiple databases simultaneously. Local applications can access individual databases. Data can be distributed across multiple locations. Locations can contain unique data, duplicate data, or both.

6 Advantages Can be based on organization structure Improves data sharing while allowing local autonomy. Improves data availability and reliability Improves performance Modular growth allows for cost- effective, competitive implementations.

7 Disadvantages Complex implementations can be difficult to maintain. Most costly and less secure than centralized data implementations. Difficult to maintain data integrity across sites. Few standards exist and most database administrators and programmers have minimal experience.

8 Data Allocation Centralized Fragmented Complete replication Selective replication

9 Transactions MySQL START TRANSACTION processing statements COMMIT | ROLLBACK SQL Server BEGIN TRANSACTION processing statements COMMIT | ROLLBACK

10 Potential Problems Dirty Read/Uncommitted Read –A user sees data that has not been committed and might change. Nonrepeatable/Nonreproduceable Read –User reads from both clean and dirty data and receives a result that changes on a subsequent read. Phantom Read –Occurs when new data becomes available after a read. Lost Update –Data update is overwritten by another user.

11 Locking Protecting data from read, modification, or both. Locking typically occurs at the table or row level, depending on the operation. A shared lock prevents one user from changing data while another user is reading from it. An exclusive lock prevents anyone else from accessing the data and is used while modifying data.

12 Deadlock User1 has locked Row1 and is waiting for access to Row2. User2 has locked Row2 and is waiting for access to Row1. Neither users' processes can continue until one of the locks is cleared.

13 Standard Isolation Levels Serializable Repeatable read Read committed Read uncommitted

14 Isolation Levels and Multiuser Access Problems Introduction to SQL, Table 27.1, pg. 742


Download ppt "Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using."

Similar presentations


Ads by Google