freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[計(jì)算機(jī)軟件及應(yīng)用]kc第16講-事務(wù)管理技術(shù)(已修改)

2025-01-31 17:26 本頁面
 

【正文】 第 10講 :(第 15章 ) 事務(wù)管理技術(shù) 重慶大學(xué)計(jì)算機(jī)學(xué)院 課程名稱 : 數(shù)據(jù)庫系統(tǒng) 第 16講:事務(wù)管理技術(shù) 項(xiàng)目驅(qū)動(dòng)目標(biāo): 如何在數(shù)據(jù)庫中實(shí)現(xiàn)可靠的事務(wù)處理: 一、事務(wù)的基本概念 ? 二、并發(fā)執(zhí)行 ? 三、可串行化 ? 四、其它事務(wù)相關(guān)知識(shí) ?. 主要討論問題: 1. 什么是事務(wù) 2. 事務(wù)應(yīng)具備什么樣的特征 3. 如何實(shí)現(xiàn)事務(wù)的原子性和持久性 4. 什么是調(diào)度 5. 什么叫調(diào)度的可串行化 6. 什么是調(diào)度的優(yōu)先圖 7. 沖突可串行化如何判定 8. 什么是可恢復(fù)調(diào)度 Exercise 16 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 pletes successfully (is mitted), the database must be consistent. ? After a transaction mits, 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 11 什么是事務(wù)? 事務(wù) 問題 1答案 一 事務(wù)的基本知識(shí) 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 Ti and Tj , it appears to Ti that either Tj finished execution before Ti started, or Tj started execution after Ti finished.(即每個(gè)事務(wù)都感覺不到其它事務(wù)在并行執(zhí)行 ) ? 持久性 Durability. After a transaction pletes successfully, the changes it has made to the database persist, even if there are system failures. To preserve the integrity of data the database system must ensure: 12 事務(wù)應(yīng)具備什么樣的特征? 事務(wù) 問題 2答案 Example of Fund Transfer–資金轉(zhuǎn)賬 ? 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. ? Isolation requirement ? Durability requirement 13 你能舉出要求事務(wù)的實(shí)例? 事務(wù) Example of Fund Transfer–資金轉(zhuǎn)賬 (續(xù) ) ? Isolation requirement — if between steps 3 and 6, another transaction is allowed to access the partially updated database, it will see an inconsistent database (the sum A + B will be less than it should be). ? Isolation can be ensured trivially一般地 by running transactions serially, that is one after the other. ? However, executing multiple transactions concurrently has significant benefits, as we will see later. ? Durability requirement — once the user has been notified that the transaction has pleted (., the transfer of the $50 has taken place), the updates to the database by the transaction must persist despite failures (after step 3 and before step 6). 事務(wù) Transaction State ? Active – the initial state。 the transaction stays in this state while it is executing ? Partially mitted – after the final statement has been executed. ? Failed after the discovery that normal execution can no longer proceed. ? Aborted – after the transaction has been rolled back and the database restored to its state p
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號(hào)-1