CS FundamentalsHardProduct-company MCQ pattern
How many of the following statements are correct? 1. A phantom read occurs when re-running a query with the same predicate returns new rows inserted and committed by another transaction. 2. Two-phase locking on individual rows alone is enough to prevent phantoms. 3. Lost updates can happen under READ UNCOMMITTED. 4. Snapshot isolation prevents dirty reads and non-repeatable reads but allows write skew.
- A. Only one
- B. Only two
- C. Only three
- D. All four
Correct answer: C. Only three
1, 3 and 4 are correct. 2 is false: row locks cannot lock rows that do not exist yet; preventing phantoms needs predicate, index-range (next-key) or table locks.
More DBMS and SQL questions
- Match each concept with its description: (P) Partial dependency (Q) Transitive dependency (R) BCNF violation (S) Multivalued dependency…
- How many of the following statements about indexing are correct? 1. A B+ tree stores data pointers only in its leaves, which are linked…
- A relation is in 2NF, but a non-key attribute depends on another non-key attribute (a transitive dependency on the key). Which normal form…
- Which SQL command removes a table completely — its rows, its structure and its definition in the catalogue?
- Table Orders(id, cust, city, amount) rows: (1, 'Ana', 'Pune', 500), (2, 'Ben', 'Delhi', NULL), (3, 'Ana', 'Pune', 300), (4, 'Chen'…
- Table Orders(id, cust, city, amount) rows: (1, 'Ana', 'Pune', 500), (2, 'Ben', 'Delhi', NULL), (3, 'Ana', 'Pune', 300), (4, 'Chen'…