1 / 36

Why should a database transaction be atomic?

Why should a database transaction be atomic?. ABORT = Removal of the updates of a transaction. An abort is implemented by a DBMS roll back recovery where the before images of the log-file are restored in the database tables. What can initiate an automatic abort?

hakan
Télécharger la présentation

Why should a database transaction be atomic?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why should a database transaction be atomic?

  2. ABORT = Removal of the updates of a transaction An abort is implemented by a DBMS roll back recovery where the before images of the log-file are restored in the database tables. What can initiate an automatic abort? When should a programmer initiate an abort?

  3. The Relaxed Atomicity Property: Root transaction Committing subtransaction

  4. The Relaxed Atomicity Property: Root transaction Committing subtransaction In E-commerce the following locations are involved: Seller, Bank of Seller, Buyer, Bank of Buyer, and Card issuer. In which locations should the compensatable, pivot and retriable subtransactions be executed?

  5. Nested atomic subtransactions: Subtransactions of a compensatable subtransaction must also be compensatable. Subtransactions of a retriable subtransaction must also be retriable.  Subtransactions of a pivot subtransaction must either be compensatable or retriable. Where would you recommend to use retriable sub-subtransactions in E-commerce?

  6. The Relaxed Atomicity Property: Root transaction Committing subtransaction How would you implement relaxed atomicity in a real- time money transfer between two domestic banks?

  7. The Relaxed Atomicity Property: Root transaction Committing subtransaction How would you implement relaxed atomicity in a real- time money transfer between banks in different contries?

  8. The Relaxed Atomicity Property: Root transaction Committing subtransaction How would you implement the different types of the 0-safe design by using relaxed atomicity?

  9. Implementation of retriable subtransactions: In practice SOA services function as RPCs and may also be used to implement UP.

  10. Architecture for PULL Update Propagation from A to B: Local databaseincluding a transaction file. System A Local databaseincluding a state record. System B

  11. Architecture for PUSH Update Propagation from A to B: Local databaseincluding a transaction file. System A Local databaseincluding a transaction file. System B

  12. PULL versus PUSH Update Propagation: • PULL UPs are batch orientated, as transaction records are only transferred periodically. • PULL UPs have smaller execution cost. • PULL UPs have a smaller programming cost. • PULL UPs of transaction records are single threaded. • PULL UPs may be initiated by a push. • PULL replication from a primary copy may have lost transactions but not lost update anomalies.

  13. Structure of a global update transaction: • [The user starts to read data] • The user enters data for the update process. • The user starts the update using the model with compensatable, pivot, and retriable subtransactions.

  14. UML-Statechart diagram for a global transaction Syntax for State diagrams: Event [condition] /Action

  15. Routing by using flexible transactions. Question 1. Describe a Petri net workflow for flexible transactions. Question 2. Change the Petri net workflow in such a way that it also functions for recovered transactions. Syntax for the State diagram: Event [condition] Action

  16. The main problems of mobile computing: • Disconnections • Location dependency • Resource constraints • Low bandwidth

  17. The disconnection problem:

  18. The location dependency problem:

  19. Push message propagation:

  20. Pull message propagation:

  21. Pull message propagationafter motion:

  22. Atomicity in mobile computing: How can SOA help in implementing mobile atomicity?

  23. Exercise: Describe and design an integrated distributed database including mobile databases where an e-commerce supplier can deliver its products direct to its customers and at the same time get automatic acknowledgement for the delivery in both the database of the supplier and the customer. Describe also the integrated workflow of the integration. Can the earlier described distributed ERP system be used?

  24. Input Input is supplier orders or deliveries. Workflow for making mobile control of supplier deliveries. New Supplier orders. Reduced product delivery Product deliveries Delivery larger than ordered ANDSPLIT Accepted product deliveries Orderlines are replicated to the mobile controllers Select a con-trol action Update the local stock ANDJOIN Delivery matches an Orderline Accepted product deliveries Reduced orderline Orderlines Delivery less than ordered ANDSPLIT Replicate the mobile registrations to the central ERP system Delivery is not ordered Error reports End of workflow

  25. End of session Thank you !!!

  26. Implementation of distributed CSCW: • Describe compensatable, pivot, and retriable subtransactions for the most important update transactions • Describe the countermeasures recommended for the most important transactions

  27. Objectives for a DDBMS(Distributed DataBase Management System): Distribution transparency, that is Replication transparency Distributed optimizer Distributed ACID properties Homogeneity as Heterogeneity is not in the marked

  28. Evaluation of distribution architectures [1] The probability of lost data as a function of the probability, say p, of a local disaster. [2] The availability as a function of the probability, say q, of a local site failure.

  29. Distributed DataBase Management System(DDBMS) TM = Transaction Manager. DM = Data Manager.

  30. Global user views Distribueret data dictionary: Global conceptual view Distribution schema Fragmentation schema Allocation schema Other locations Other locations Local conver-sion schema Local conver-sion schema Local schema Local schema Server Server

  31. Distributed DataBase Management System(DDBMS) TM = Transaction Manager. DM = Data Manager.

  32. TM dictio-nary Homogenious DDBMS. DM dictio-nary

  33. TM dictio-nary Heterogenious DDBMS. Conver-sion schema TM dictio-nary

  34. Commit by using distributed 2PC:

  35. Abort with distributed 2PC

More Related