Question 61
HardT1 reads X, T2 writes X and commits, and T1 reads X again and sees a different value. Which isolation level is the lowest that prevents this?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
T1 reads X, T2 writes X and commits, and T1 reads X again and sees a different value. Which isolation level is the lowest that prevents this?
READ COMMITTED
SERIALIZABLE only
REPEATABLE READ
READ UNCOMMITTED
Sign up free to see the answer and a step-by-step explanation.
Which anomaly can SERIALIZABLE isolation prevent that REPEATABLE READ (in the SQL standard) allows?
Lost updates within one row
Dirty reads
Non-repeatable reads
Phantom reads
Sign up free to see the answer and a step-by-step explanation.
Snapshot isolation prevents dirty and non-repeatable reads. Which anomaly can still happen?
Reading uncommitted data
Dirty read
Write skew
Lost update of the same row (in most implementations)
Sign up free to see the answer and a step-by-step explanation.
Two doctors are on call, and a rule says at least one must stay. Under snapshot isolation, both check that the other is on call and remove themselves at the same time. What is this anomaly?
Write skew
Dirty read
Deadlock
Phantom read
Sign up free to see the answer and a step-by-step explanation.
A crash occurs. The log shows T1 committed, T2 started but did not commit, and T3 committed after the last checkpoint. Under undo/redo recovery, what is done?
Undo all three
Redo T1's and T3's changes as needed and undo T2's
Do nothing
Redo T2 only
Sign up free to see the answer and a step-by-step explanation.
What does a checkpoint reduce during recovery?
The amount of log that must be scanned and replayed
The number of transactions allowed
The need for locks
The size of the database
Sign up free to see the answer and a step-by-step explanation.
In ARIES recovery, what are the three phases in order?
Analysis, undo, redo
Redo, undo, analysis
Undo, redo, analysis
Analysis, redo, undo
Sign up free to see the answer and a step-by-step explanation.
Why does ARIES write compensation log records (CLRs) during undo?
To encrypt the log
So that undo work isn't repeated if the system crashes again during recovery
To speed up reads
To delete old records
Sign up free to see the answer and a step-by-step explanation.
Which buffer policy pair needs both undo and redo at recovery?
No-steal and force
Steal and force
Steal and no-force
No-steal and no-force
Sign up free to see the answer and a step-by-step explanation.
A schedule is recoverable if:
No transaction reads anything
Each transaction commits only after every transaction it read from has committed
All transactions run serially
No transaction aborts
Sign up free to see the answer and a step-by-step explanation.