The following tables (Table 2 and Table 3) with the following values are stored in Oracle database. PROD CODE PROD_QOH 205 PART CODE PART_QOH АВС A 567 DEF 234 98 Table 2: PRODUCT 549 Table 3: PART (a) The following transaction in Figure 2 is executed: Transaction 1 UPDATE PRODUCT SET PROD_QOH = PROD_OQH+1 WHERE PROD_CODE='ABC'; UPDATE PART SET PART_QOH = PART_OQH - 1 WHERE PART_CODE= 'A'; UPDATE PART SET PART_QOH = PART_OQH - 1 WHERE PART_CODE= 'B'; UPDATE PART SET PART_QOH = PART_OQH - 1 WHERE PART_CODE= 'C'; Figure 2: A Transaction in Oracle Database (i) Assume transaction logs are recorded when Transaction 1 is executed. State the steps for the database recovery according to the logs if a ROLLBACK command was issued at the end of the transaction. State and explain ONE property of transactions that is observed with the rollback action in (i) of this question. (ii)

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter6: Additional Database Objects
Section: Chapter Questions
Problem 1HOA
icon
Related questions
Question
The following tables (Table 2 and Table 3) with the following values are stored in Oracle
database.
PROD CODE
PROD_QOH
PART CODE
PART_QOH
АВС
205
A
567
DEF
234
98
Table 2: PRODUCT
C
549
Table 3: PART
(a) The following transaction in Figure 2 is executed:
Transaction 1
UPDATE PRODUCT
SET PROD QOH = PROD_OQH+1
WHERE PROD CODE= 'ABC';
UPDATE PART
SET PART_QOH = PART_OQH - 1
WHERE PART CODE='A';
UPDATE PART
SET PART_QOH = PART_OQH - 1
WHERE PART_CODE= 'B';
UPDATE PART
SET PART_QOH = PART_OQH - 1
WHERE PART_CODE= 'C';
Figure 2: A Transaction in Oracle Database
(i)
Assume transaction logs are recorded when Transaction 1 is executed. State the steps
for the database recovery according to the logs if a ROLLBACK command was
issued at the end of the transaction.
(ii)
State and explain ONE property of transactions that is observed with the rollback
action in (i) of this question.
Transcribed Image Text:The following tables (Table 2 and Table 3) with the following values are stored in Oracle database. PROD CODE PROD_QOH PART CODE PART_QOH АВС 205 A 567 DEF 234 98 Table 2: PRODUCT C 549 Table 3: PART (a) The following transaction in Figure 2 is executed: Transaction 1 UPDATE PRODUCT SET PROD QOH = PROD_OQH+1 WHERE PROD CODE= 'ABC'; UPDATE PART SET PART_QOH = PART_OQH - 1 WHERE PART CODE='A'; UPDATE PART SET PART_QOH = PART_OQH - 1 WHERE PART_CODE= 'B'; UPDATE PART SET PART_QOH = PART_OQH - 1 WHERE PART_CODE= 'C'; Figure 2: A Transaction in Oracle Database (i) Assume transaction logs are recorded when Transaction 1 is executed. State the steps for the database recovery according to the logs if a ROLLBACK command was issued at the end of the transaction. (ii) State and explain ONE property of transactions that is observed with the rollback action in (i) of this question.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Datawarehouse
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning