...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 539
A transaction can include following basic database access operations :
A
Read_item(X)
B
Write_item(X)
C
Both (A) and (B)
D
None of these
Question 539 Explanation: 
Basic operations are read and write
1. read_item(X): Reads a database item named X into a program_variable. To simplify our notation, we assume that the program variable is also named X, i.e X=r(x)
steps:

1. Find the address of the disk block that contains item X.
2. Copy that disk block into a buffer in main memory (if that disk block is not already in some main memory buffer).
3. Copy item X from the buffer to the program variable named X.

2. write_item(X): Writes the value of program variable X into the database item named X.
steps:
1. Find the address of the disk block that contains item X.
2. Copy that disk block into a buffer in main memory (if that disk block is not already in some main memory buffer).
3. Copy item X from the program variable named X into its correct location in the buffer.
4. Store the updated block from the buffer back to disk (either immediately or at some later point in time).

Correct Answer: C
Question 539 Explanation: 
Basic operations are read and write
1. read_item(X): Reads a database item named X into a program_variable. To simplify our notation, we assume that the program variable is also named X, i.e X=r(x)
steps:

1. Find the address of the disk block that contains item X.
2. Copy that disk block into a buffer in main memory (if that disk block is not already in some main memory buffer).
3. Copy item X from the buffer to the program variable named X.

2. write_item(X): Writes the value of program variable X into the database item named X.
steps:
1. Find the address of the disk block that contains item X.
2. Copy that disk block into a buffer in main memory (if that disk block is not already in some main memory buffer).
3. Copy item X from the program variable named X into its correct location in the buffer.
4. Store the updated block from the buffer back to disk (either immediately or at some later point in time).

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!