Bird
0
0

What is the best approach to reduce these errors while maintaining data accuracy?

hard📝 Application Q15 of 15
SQL - Transactions and Data Integrity
A bank application uses SERIALIZABLE isolation level to prevent anomalies. However, users report frequent transaction failures due to serialization errors. What is the best approach to reduce these errors while maintaining data accuracy?
AKeep SERIALIZABLE and retry failed transactions automatically
BDisable transactions to improve performance
CSwitch to READ UNCOMMITTED to avoid errors
DLower isolation level to READ COMMITTED and add explicit locking where needed
Step-by-Step Solution
Solution:
  1. Step 1: Understand SERIALIZABLE issues and evaluate best practice

    SERIALIZABLE prevents anomalies but causes serialization errors on conflicts. Lowering isolation risks anomalies; best is to keep SERIALIZABLE and retry failed transactions automatically.
  2. Final Answer:

    Keep SERIALIZABLE and retry failed transactions automatically -> Option A
  3. Quick Check:

    Retry on serialization errors = Keep SERIALIZABLE and retry failed transactions automatically [OK]
Quick Trick: Retry failed SERIALIZABLE transactions to keep accuracy [OK]
Common Mistakes:
  • Lowering isolation level without safeguards
  • Ignoring serialization errors
  • Disabling transactions for performance

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes