11
Presented By: Shreya Patel (130460107050) Vidhi Patel (130460107052) Universal College Of Engineering And Technology

Presented By: Shreya Patel (130460107050) Vidhi Patel (130460107052) Universal College Of Engineering And Technology

Embed Size (px)

Citation preview

Presented By: Shreya Patel (130460107050) Vidhi Patel (130460107052)

Presented By:Shreya Patel (130460107050)Vidhi Patel (130460107052)Universal College Of Engineering And Technology

ACID PropertiesAtomicityConsistencyIsolationDurabilityTransactionsA transaction is a logical unit of work on a databaseEach transaction does something in the databaseNo part of it alone achieves anything of use or interestTransactions are the unit of recovery, consistency, and integrity as wellACID propertiesAtomicityConsistencyIsolationDurabilityACID Properties of TransactionsAtomicity transaction is indivisible it completes entirely or not at all, despite failures

Consistency system rules (invariants) are maintained despite crashes or concurrent access

Isolation transactions appear indivisible to each other despite concurrent accessIf multiple threads execute transactions the effect is the same as if transactions were executed sequentially in some order

Durability effects of committed transactions survive subsequent failures

AtomicityTransactions are atomic they dont have parts (conceptually)cant be executed partially; it should not be detectable that they interleave with another transaction.

To ensure atomicity database system keeps track of old values of any data on which transaction performs a write.If the transaction does not complete its execution, the database restore the old values.Atomicity is handled by TRANACTION MANAGEMENT component.ConsistencyTransactions take the database from one consistent state into anotherIn the middle of a transaction the database might not be consistent.

The consistency requirement is the sum of A and B be unchanged by the execution of the transaction.

IsolationThe effects of a transaction are not visible to other transactions until it has completedFrom outside the transaction has either happened or notTo me this actually sounds like a consequence of atomicity

Ensuring the isolation property is the responsibility of concurrent control component.DurabilityOnce a transaction has completed, its changes are made permanentEven if the system crashes, the effects of a transaction must remain in place.Ensuring durability is the responsibility of a component called the recovery management.Example of transactionTransfer 50 from account A to account BRead(A)A = A - 50Write(A)Read(B)B = B+50Write(B)Atomicity - shouldnt take money from A without giving it to BConsistency - money isnt lost or gainedIsolation - other queries shouldnt see A or B change until completionDurability - the money does not go back to ATransactionThank you