Data Access in DBMS  

When a transaction is executed, then different memory blocks are assigned to the transaction to hold the data. The data residing in the database are stored in the physical memory like hard disk. The data location in the physical memory is called as physical blocks. When a transaction retrieves the data from these physical blocks, the same is copied to the main memory and are stored in buffer blocks. These are temporary storage blocks and are helpful in accessing the data again and again. This reduces the access to physical blocks and hence time / cost are also reduced.

Let B be a block in the memory. Then input (B) implies transferring the data from the physical block B to the buffer block in the main memory. Output (B) implies transferring the data from buffer block to main memory for permanently updating it in the database. In addition some memory blocks are assigned to each transaction in the main memory to in which it can hold the data items temporarily. This memory blocks are called as work area of the transactions. This is depicted in below diagram.

We can observe in above diagram that, when a transaction T1 wants to access the data item A, it is retrieved from the physical memory (input (A)) into buffer block X in the main memory. Then the local copy of it is created, x1 and assigned to the work area of T1. Similarly, result of transaction T1 is stored in the local variable y1 and is transferred to buffer block, Y. It is then updated to disk by output (B). This is how data items are transferred when a transaction is being processed.

See also
OSI Model