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!