トランザクション処理におけるコミットの説明として, 適切なものはどれか。
令和5年度 ITパスポート試験 問66
This question's explanation and your answers so far.
問 66
Incorrectア
Prohibiting updates from other transactions on shared data that one transaction is updating describes exclusive control (locking), not a commit.
- イ
正解 A commit is the operation of permanently reflecting the update contents into the database and finalizing them when all of the series of processes within a transaction have completed normally. After a commit, the change becomes official and can no longer be undone. Choice イ, 'finalizing the updates to the database when a transaction is processed normally', is exactly this definition, so it is appropriate.
Incorrectウ
Returning the database to the state before the transaction started when processing does not finish normally describes a rollback, which is the opposite operation of a commit that finalizes updates.
Incorrectエ
Combining multiple tables into one using the columns that relate them as keys describes a join in a relational database, which is unrelated to a transaction commit.
- A commit is the operation of finalizing the update contents into the database when a transaction ends normally. It is the counterpart concept to a rollback, which reverts to the state before the start on failure.
- Exclusive control (locking) and table joins are concepts separate from a transaction's finalization processing; the key point is not to confuse these terms.