hce_nsysu
112年
計算機概論與程式設計
第 46 題
The ACID (Atomic, Consistency, Isolation, and Durability) properties are essential for a DBMS transaction. Which one of the following statements is wrong?
- A All changes to data are performed as if they are a single operation.
- B If two operations are concurrently running on two different accounts, then the value of both accounts should not get affected.
- C Any changes that occur in a transaction will not be seen by other transactions until the change is committed.
- D The purpose of the ACID properties is to guarantee data validity despite errors or power failures.
- E All of the above.
思路引導 VIP
試著想像一個情境:當你正在銀行 ATM 轉帳給朋友時,如果銀行系統在「扣除你的餘額」之後、「增加朋友的餘額」之前突然斷電了,你認為系統應該具備什麼樣的特性,才能確保你的錢不會憑空消失,或者確保這筆交易能像從未發生過一樣恢復原狀?
🤖
AI 詳解
AI 專屬家教
太棒了!你能精準選出選項 (E),代表你對資料庫的 ACID 特性有著非常紮實且細膩的理解。這道題目的設計帶有一個有趣的邏輯陷阱:它要求選出一個「錯誤(wrong)」的敘述,但當我們逐一檢視前面四個選項時,會發現它們都是對 ACID 的正確描述。
ACID 的核心防線
首先,選項 (A) 完美詮釋了 原子性 (Atomicity),確保交易如同單一操作,要麼全做、要麼全不做。選項 (C) 描述了 隔離性 (Isolation) 的基本要求,即未提交(uncommitted)的變更不應被其他交易所見;而 (D) 則是 ACID 的總體目標,確保在系統崩潰或斷電時,資料依然具備 一致性 (Consistency) 與 持續性 (Durability)。至於選項 (B),雖然語法稍顯模糊,但在討論併發控制時,它指涉了不同交易間不應產生非預期的干涉。
▼ 還有更多解析內容