正在加载图片...
Required Properties of a Transaction Consider a transaction to transfer $50 from account A to account B: 1.read(A) 2.A=A-50 3.write(A) 4.read(B) 5.B:=B+50 6.write(B) Atomicity requirement If the transaction fails after step 3 and before step 6,money will be "lost"leading to an inconsistent database state Failure could be due to software or hardware The system should ensure that updates of a partially executed transaction are not reflected in the database Durability requirement-once the user has been notified that the transaction has completed (i.e.,the transfer of the $50 has taken place),the updates to the database by the transaction must persist even if there are software or hardware failures. Database System Concepts-6th Edition 14.4 @Silberschatz,Korth and SudarshanDatabase System Concepts - 6 14.4 ©Silberschatz, Korth and Sudarshan th Edition Required Properties of a Transaction Consider a transaction to transfer $50 from account A to account B: 1. read(A) 2. A := A – 50 3. write(A) 4. read(B) 5. B := B + 50 6. write(B) Atomicity requirement If the transaction fails after step 3 and before step 6, money will be “lost” leading to an inconsistent database state  Failure could be due to software or hardware The system should ensure that updates of a partially executed transaction are not reflected in the database Durability requirement — once the user has been notified that the transaction has completed (i.e., the transfer of the $50 has taken place), the updates to the database by the transaction must persist even if there are software or hardware failures
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有