Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Selecting isolation level for concurrent processing

User_0U9LVNov 9 2021

I'm trying to study for an exam and I'm currently going through practice questions. I have to choose the best isolation level (from READ ONLY, READ COMMITTED and SERIALIZABLE) for two transactions that are processed concurrently.
Transaction 1:

UPDATE POSITION
SET bonus = salary / 10
WHERE salary > 100000;
COMMIT;

Transaction 2:

UPDATE POSITION
SET bonus = NVL(bonus, 0) + &AdditionBonus
WHERE salary < 400000;

SELECT pnumber, title, salary, bonus
FROM POSITION;

COMMIT;

The level for each transaction has to be chosen to avoid corruption in the database. I understand that READ COMMITTED will have statement-level consistency and SERIALIZABLE will have transaction-level consistency but I'm really struggling to apply the concept when presented with actual transactions.
Thank you!

Comments
Post Details
Added on Nov 9 2021
14 comments
823 views