In the database update conversation, the client transaction program requests
a copy of data, modifies it, and returns it to be stored. The server transaction
program locks the data for the client's use until the update is complete.
Actions
in Database Update Conversation summarizes client and server actions.
Table 1. Actions
in Database Update Conversation
| Client Actions |
Server Actions |
| Send a request for data (a record
key). |
|
| Receive. |
|
|
Receive the key value. |
|
Fetch the record and lock it. |
|
Send a copy of the record. |
|
Receive. |
| Process the received record. |
|
| Send the updated record. |
|
| Await confirmation. |
|
|
Update the database with the received record. |
|
Confirm the update. |
| Close. |
Close. |
Refer to
LU 6.2 Operations to clarify this process. When the client
transaction program first issues
Receive, three things
occur:
- LU 6.2 send buffer is flushed of any remaining logical records sent
by the client.
- The client transaction program, that began in send state, switches to
receive state. The right to send passes to the server transaction program.
- The client transaction program waits until data arrives. (Nonblocking
receive operations are available also.)
Similarly, the second
Receive issued by the
server flushes its buffer and transfers the right to send back to the client
transaction program.