5.1 Tuple Relational Calculus Language ALPHA - Update Operations
(1) Modification Operations with UPDATE Statement
The steps to execute an update operation in ALPHA are as follows:
-
Use the HOLD statement: Initially, retrieve the tuple to be modified from the database into the workspace using the
HOLD
statement. -
Modify attributes in workspace: Modify the attributes of the tuple in the workspace using the host language.
-
Send modified tuple back with UPDATE: Finally, use the
UPDATE
statement to send the modified tuple back into the database.
Important Notes:
- For simple data retrieval, the
GET
statement can be used directly. - However, to retrieve tuples specifically for modification, you must use the
HOLD
statement. This statement is a concurrent control-enabled version of GET.
Concurrency control details will be further elaborated in Chapter 5.