Bird
0
0

How can phantom reads be prevented without using SERIALIZABLE isolation level?

hard📝 Application Q9 of 15
SQL - Transactions and Data Integrity
How can phantom reads be prevented without using SERIALIZABLE isolation level?
ABy using REPEATABLE READ with predicate locking
BBy using READ UNCOMMITTED isolation level
CBy disabling transactions
DBy setting isolation level to READ COMMITTED
Step-by-Step Solution
Solution:
  1. Step 1: Define phantom reads

    Phantom reads occur when new rows appear in repeated queries.
  2. Step 2: Identify isolation preventing phantoms without SERIALIZABLE

    REPEATABLE READ with predicate locking can prevent phantoms.
  3. Final Answer:

    By using REPEATABLE READ with predicate locking -> Option A
  4. Quick Check:

    Predicate locking blocks phantoms [OK]
Quick Trick: Predicate locking prevents phantom reads [OK]
Common Mistakes:
  • Assuming READ COMMITTED blocks phantoms
  • Thinking disabling transactions helps

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes