In transactions, a write-item (X) command includes the following steps.…
2026
In transactions, a write-item (X) command includes the following steps. Arrange the following steps in correct sequence.
A. Copy item X from the program variable named X into its correct location in the buffer.
B. Store the updated block from the buffer back to disk.
C. Find the address of the disk block that contains item.
D. Copy that disk block into a buffer in main memory.
choose the correct answer from the options given below:
C,D,A,B
A,C,D,B
C,A,B,D
D,B,C,A
- A.
1
- B.
2
- C.
3
- D.
4
Attempted by 155 students.
Show answer & explanation
Correct answer: A
Correct Sequence for Write-Item Command
To perform a write-item (X) command in a database transaction system, the following logical steps must occur in a specific order to ensure data integrity and proper buffer management.
Find the address of the disk block that contains item (Step C). The system must first locate the specific block on the disk.
Copy that disk block into a buffer in main memory (Step D). Once the address is found, the block is loaded from the disk into a buffer in RAM.
Copy item X from the program variable named X into its correct location in the buffer (Step A). The new data is then written into the specific location within the in-memory buffer.
Store the updated block from the buffer back to disk (Step B). Finally, the modified block in the buffer is written back to the permanent storage on the disk.
Therefore, the correct sequence is C → D → A → B.