Question 31
MediumWhat is a phantom read?
- A.
Reading from a crashed disk
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
What is a phantom read?
Reading from a crashed disk
Reading a row that was updated
Reading uncommitted data
Running the same query twice and getting new rows that another transaction inserted
Sign up free to see the answer and a step-by-step explanation.
Which is the lowest SQL isolation level, which allows dirty reads?
READ UNCOMMITTED
SERIALIZABLE
REPEATABLE READ
READ COMMITTED
Sign up free to see the answer and a step-by-step explanation.
How does write-ahead logging (WAL) support atomicity and durability?
Log records describing each change are written to stable storage before the changed data pages
Data is written before the log
Logs are never stored on disk
Each transaction gets its own disk
Sign up free to see the answer and a step-by-step explanation.
Which ACID property is mainly the responsibility of the recovery system?
Atomicity and durability
None of them
Consistency only
Isolation only
Sign up free to see the answer and a step-by-step explanation.
A transfer debits ₹1,000 from account A and credits it to B. A power cut happens after the debit. Which ACID property ensures the debit is undone?
Atomicity
Consistency
Isolation
Durability
Sign up free to see the answer and a step-by-step explanation.
After a transaction commits, the server crashes. On restart the change is still there. Which ACID property is this?
Atomicity
Consistency
Durability
Isolation
Sign up free to see the answer and a step-by-step explanation.
A rule says the total money in all accounts must not change during transfers. Which ACID property is about keeping such rules true?
Durability
Consistency
Isolation
Atomicity
Sign up free to see the answer and a step-by-step explanation.
Two users book the last seat at the same time, and both are told they succeeded. Which ACID property was violated?
Isolation
Consistency of the schema
Durability
Atomicity
Sign up free to see the answer and a step-by-step explanation.
T1 updates a row, T2 reads the new value, then T1 rolls back. What did T2 experience?
A dirty read
A phantom read
A lost update
A non-repeatable read
Sign up free to see the answer and a step-by-step explanation.
T1 and T2 both read stock = 10, each subtracts 1 and writes 9. What problem is this?
Phantom read
Cascading rollback
Lost update
Dirty read
Sign up free to see the answer and a step-by-step explanation.