CS FundamentalsModerateGATE CS · DBMS
Optimistic (validation-based) concurrency control runs each transaction in three phases. In which order, and when are its writes applied to the database?
- A. Read, validation, write — writes go to the database only after validation succeeds
- B. Validation, read, write — writes are applied during the read phase
- C. Read, write, validation — writes are undone if validation fails
- D. Write, read, validation — validation checks the log
Correct answer: A. Read, validation, write — writes go to the database only after validation succeeds
A transaction works on private copies in the read phase, is checked against overlapping transactions at validation, and installs its updates only in the write phase, so a failed validation needs no undo.
More DBMS and SQL questions
- R(A, B, C, D, E) has functional dependencies DE → B, AC → E, AD → E, BD → CE, C → A. How many prime attributes does R have?
- A file has 50,000 records of 200 bytes stored unspanned in 2048-byte blocks, NOT ordered on attribute X. A dense secondary index on X (a…
- A table Teach(course, teacher, book) records that each course is taught by several teachers and uses several books, independently of each…
- How many of these statements are correct? 1. A BCNF decomposition obtained by the standard algorithm is always lossless. 2. A BCNF…
- R(A, B, C, D, E, F) has functional dependencies AD → BF, BD → F, F → A. How many superkeys does R have?
- R(A, B, C, D, E) with functional dependencies A → E, D → C, C → DE is decomposed into R1(C, D, E), R2(A, B, C). Which statement is correct?