Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Countermeasures against Consistency Anomalies in Databases with Relaxed ACID Properties. By Lars Frank Copenhagen Business School.

Similar presentations


Presentation on theme: "1 Countermeasures against Consistency Anomalies in Databases with Relaxed ACID Properties. By Lars Frank Copenhagen Business School."— Presentation transcript:

1 1 Countermeasures against Consistency Anomalies in Databases with Relaxed ACID Properties. By Lars Frank Copenhagen Business School

2 Database Consistency: A database is consistent if its data complies with the consistency rules of the database. Automatic DBMS consistency control normally consists of attribute validation and referential integrity control. If the database is consistent both when a transaction starts and when it has been committed, the execution has the consistency property.

3 3 The ACID properties of transactions: Atomicity = the all or nothing update property. Consistency property = if a database is consistent before a transaction is executed, then the database must also be consistent after the transaction is executed. Isolation = The updates of a transaction must not be seen by other transactions before the transaction is committed. Durability = Committed data can be recovered in case of failures. -----------------------------------------------

4 Asymptotic Consistency: Databases with relaxed ACID properties is almost always inconsistent. With asymptotic consistency the database should converge towards a consistent state when all active transactions have been committed/compensated. Countermeasures against Consistency anomalies are used to implement asymptotic consistency.

5 Consistency Control: Automatic DBMS consistency control normally consists of attribute validation and referential integrity control. Attributes may be validated against its domain where e.g. minimum and maximum values may be described. Referential integrity may validate that e.g. so called child records must not be created without relationship to a parent record.

6 Consistency Anomaly = Violation of the consistency constraints of a database.

7 Countermeasures against isolation anomalies: The Reread Counter-measure The Commutative Updates Counter-measure The Version File Counter-measure The Version File and Commutative Updates Counter-measure The Pessimistic View Counter-measure The Semantic Lock Counter-measure The End of Day Transaction Countermeasure Counter-measures by Value The Pivot Lock Counter-measure The Enforcement Method Counter-measure

8 The Pessimistic View Counter-measure: The idea of this countermeasure is to “limit” the options of concurrent users to prevent them from outsize a lower limit of existing resources. Therefore, compensatable subtransactions should be used for updates that decrease the users’ options. That is, concurrent transactions cannot use resources that are reserved for the compensatable subtransaction. The retriable subtransactions should be used for updates that “increase” the users’ options. That is, concurrent transactions can only use increased resources after the increase has been committed globally. The pivot subtransactions may also be used for updates that “increase” and/or “limit” the users’ options because this update reflects the real world reality.

9 The Optimistic Countermeasure: Suppose a stock in a remote location has an maximum capacity. The Optimistic Countermeasure can eliminate the risk involved in violating an upper limit in some remote stock attribute. The optimistic countermeasure should be implemented by using: -The pivot or compensatable subtransactions for updates that “increase” the users’ options. That is, concurrent transactions cannot deposit resources that are reserved for depositing by the compensatable/pivot subtransactions. -The pivot or retriable subtransactions for updates that “decrease” the users’ options. That is, concurrent transactions can only withdraw resources after the increase has been committed. Sometimes transactions that use the optimistic countermeasure cannot be compensated. Therefore, these transactions have to be optimistic.

10 Referential integrity control The remote parent Countermeasure creates the potential child record by initiating a retriable creating subtransaction in the location of the parent record. The i-safe replication may be viewed as a special case of distributed referential integrity control as the first or primary copy of a record may be viewed as the parent and all the replicas may be viewed as children.

11 A distributed modular ERP system have relaxed ACID properties across the autonomous databases of the ERP modules. How would you implement relaxed consistency control?

12 End of session Thank you !!!

13 An ERP sales module integrated with mobile autonomous salesmen


Download ppt "1 Countermeasures against Consistency Anomalies in Databases with Relaxed ACID Properties. By Lars Frank Copenhagen Business School."

Similar presentations


Ads by Google