![Page 1: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/1.jpg)
Unit 9Unit 9
Transaction ProcessingTransaction Processing
![Page 2: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/2.jpg)
Key ConceptsKey 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
![Page 3: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/3.jpg)
Distributed Database TermsDistributed 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.
![Page 4: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/4.jpg)
Distributed Database Distributed Database SampleSample
• Database Systems, Example 22.1, pg. 690
![Page 5: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/5.jpg)
Distribute Database PointsDistribute 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.
![Page 6: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/6.jpg)
AdvantagesAdvantages• 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.
![Page 7: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/7.jpg)
DisadvantagesDisadvantages• 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.
![Page 8: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/8.jpg)
Data AllocationData Allocation• Centralized• Fragmented• Complete replication• Selective replication
![Page 9: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/9.jpg)
TransactionsTransactions• MySQLSTART TRANSACTION
processing statementsCOMMIT | ROLLBACK• SQL ServerBEGIN TRANSACTION
processing statementsCOMMIT | ROLLBACK
![Page 10: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/10.jpg)
Potential ProblemsPotential 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.
![Page 11: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/11.jpg)
LockingLocking• 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.
![Page 12: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/12.jpg)
DeadlockDeadlock• 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.
![Page 13: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/13.jpg)
Standard Isolation LevelsStandard Isolation Levels• Serializable• Repeatable read• Read committed• Read uncommitted
![Page 14: Unit 9 Transaction Processing. Key Concepts Distributed databases and DDBMS Distributed database advantages. Distributed database disadvantages Using](https://reader036.vdocuments.us/reader036/viewer/2022081506/56649eef5503460f94bff81c/html5/thumbnails/14.jpg)
Isolation Levels andIsolation Levels andMultiuser Access ProblemsMultiuser Access Problems
• Introduction to SQL, Table 27.1, pg. 742