Skip to content

平成21年度 秋期 ITパスポート試験 問88

This question's explanation and your answers so far.

問88
頻出度★☆☆

複数の利用者が同時にデータベースを利用する場合に,1人の利用者がデータ更新中に,同一のデータを別の利用者が参照しようとした。このとき,データの整合性を保障するためのデータベース管理システムでの制御として,適切なものはどれか。

出典 平成21年度 秋期 ITパスポート試験 問88
解説

問 88

  • Incorrectア

    Interrupting the update every time a read is requested would obstruct an update that is legitimately in progress and leave the processing stopped halfway. A read request is no reason to break off an update, so this is not a control that preserves consistency.

  • Incorrectイ

    If the other user reads uncommitted data that is still being updated and the update is later canceled (rolled back), the user has read a value that does not exist. This inconsistency is called a dirty read, a state the DBMS must avoid.

  • ウ

    正解 A database management system (DBMS) performs concurrency control (locking) when several users handle the same data at the same time. Data that one user is updating is not yet finalized until the transaction completes (commits); it is in an incomplete, halfway state, so showing that intermediate value to other users would cause processing based on wrong data. The DBMS therefore makes the reading side wait until the updating side releases the lock (its processing finishes), and lets it read only finalized data. This is ウ, “Let the other user reference the data only after the updating user's processing has finished,” the correct control for keeping data consistent.

  • Incorrectエ

    Discarding an update in progress merely because someone else wants to read the data would unfairly throw away the updating user's legitimate work. Discarding an update (rollback) is done when a failure occurs or the update is explicitly canceled, not as a response to a read request.

ここがポイント
  • Concurrency control (locking): a DBMS mechanism that keeps data consistent by making reads or updates of data being updated wait.
  • A transaction has ACID properties; intermediate data is not shown to other users until it is committed and finalized (preventing dirty reads).
用語

Your answers