没有合适的资源?快使用搜索试试~ 我知道了~
数据库管理系统:ch15 Transactions.ppt
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 172 浏览量
2022-06-09
22:36:21
上传
评论
收藏 661KB PPT 举报
温馨提示
试读
30页
数据库管理系统:ch15 Transactions.ppt
资源推荐
资源详情
资源评论
©Silberschatz, Korth and Sudarshan15.2Database System Concepts - 5
th
Edition, Sep 10, 2005.
Chapter 15: Transactions
Chapter 15: Transactions
Transaction Concept
Transaction State
Concurrent Executions
Serializability
Recoverability
©Silberschatz, Korth and Sudarshan15.3Database System Concepts - 5
th
Edition, Sep 10, 2005.
Transaction Concept
Transaction Concept
A transaction is a unit of program execution that accesses and
possibly updates various data items.
A transaction must see a consistent database.
During transaction execution the database may be temporarily
inconsistent.
When the transaction completes successfully (is committed), the
database must be consistent.
After a transaction commits, the changes it has made to the
database persist, even if there are system failures.
Multiple transactions can execute in parallel.
Two main issues to deal with:
Failures of various kinds, such as hardware failures and system
crashes
Concurrent execution of multiple transactions
©Silberschatz, Korth and Sudarshan15.4Database System Concepts - 5
th
Edition, Sep 10, 2005.
ACID Properties
ACID Properties
Atomicity. Either all operations of the transaction are properly reflected
in the database or none are.
Consistency. Execution of a transaction in isolation preserves the
consistency of the database.
Isolation. Although multiple transactions may execute concurrently,
each transaction must be unaware of other concurrently executing
transactions. Intermediate transaction results must be hidden from other
concurrently executed transactions.
That is, for every pair of transactions T
i
and T
j
, it appears to T
i
that
either T
j
, finished execution before T
i
started, or T
j
started execution
after T
i
finished.
Durability. After a transaction completes successfully, the changes it
has made to the database persist, even if there are system failures.
A transaction is a unit of program execution that accesses and possibly
updates various data items.To preserve the integrity of data the database
system must ensure:
©Silberschatz, Korth and Sudarshan15.5Database System Concepts - 5
th
Edition, Sep 10, 2005.
Example of Fund Transfer
Example of Fund Transfer
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, the system should ensure that its updates are not
reflected in the database, else an inconsistency will result.
Consistency requirement – the sum of A and B is unchanged by the
execution of the transaction.
剩余29页未读,继续阅读
资源评论
wxg520cxl
- 粉丝: 23
- 资源: 3万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功