1distdb - CSE-5120-Fall-2009 Distributed Databases Chapter...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE-5120-Fall-2009 Distributed Databases Chapter 18(19) of Book: Database Systems Concept, 3rd(4th) Ed or Chapter 22 of Book: Database Management Systems, 3rd ed. ? ? ? • 1. Introduction • 2. Commit Protocols • 3. Query Processing • 4. Concurrency Control • 5. Deadlock Handling • 6. Generating Unique Timestamps • 7. Coordinator Selection Consider a banking system consisting of four branches located in four dif- ferent cities. Each branch has its own computer with a database consisting of all the accounts main- tained at that branch. Each branch maintains a relation deposit(Deposit-scheme) Deposit-scheme = (branch-name, account-number, customer-name, balance) There also exists one single site that main- tains information about all the branches of the bank. Branch-scheme = (branch-name, assets, branch-city) Local Transaction : accesses accounts in the single site at which it was initiated. Global Transaction : • accesses an account from a site different from the initiation site • or accesses accounts in several different sites Design of Distributed Databases • Replication • Fragmentation • Replication and Fragmentation Data Fragmentation • Horizontal Fragmentation • Vertical Fragmentation • Mixed Fragmentation 2. COMMIT PROTOCOLS Committing Distributed Transactions Transactions • BEGIN .... COMMIT (normal transaction) • BEGIN .... ABORT (voluntary: inputs are wrong, division by zero, etc) • BEGIN .... ABORT (forced by system, e.g. deadlock, system overload, or crash) ? ? ? 1 ATOMICITY : All or none of the effects of a transaction should be reflected in the database. Distributed Transactions Data resides on different sites. Requests of transaction sent to different sites. Two-Phase Commit : Centralized Scheme Phase : occurs when all participants make a state transition (e.g. to w i or to c i ) END READY? And( ABORT ) Or(NO ) And ( COMMIT ) And( YES ) Timeout i And(ABORT ) q w c a Coordinator = Site 0 Participant Site i S1 S2 I O 2. New state S2 is recorded in stable storage 1. Input message I is received 3. Output message O is sent i i i i i (1 <=i<=m) READY? READY? NO YES COMMIT q w a c i i i i i i i i i i ABORT TIMEOUTS: • If YES/NO response doesn’t arrive, Assume NO. • In all other situations, if an expected re- sponse doesn’t arrive, a participant requests a retransmission the coordinator repeats the same com- mand. Timeout Actions: • participant at State q : abort • Coordinator at State w : abort • participant at State w : consult other par- ticipants (may block) Recovery Actions: • participant failed at state q : abort • participant failed at state a : abort • participant failed at state w : consult other sites (may block) Failures A commit protocol is blocking with respect to certain failures if the operational sites can- not terminate (either ABORT or COMMIT) until recovery from those failures....
View Full Document

Page1 / 10

1distdb - CSE-5120-Fall-2009 Distributed Databases Chapter...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online