A buffer manager uses the STEAL and NO-FORCE policies. Which recovery actions must the log support?
Correct answer D. Both undo and redo
Topic / 89 questions
DBMS and SQL MCQs cover database management concepts and the SQL query language, a core subject in computer science degrees, IT recruitment tests and lecturer exams. Questions range from keys and normal forms to joins, GROUP BY and HAVING, transactions and concurrency control. Each answer includes an explanation, and SQL output questions were checked by running the queries.
Correct answer D. Both undo and redo
Correct answer B. It must be at least half full
Correct answer D. One, because the clustered index defines the physical order of the data rows
Correct answer B. WHERE salary BETWEEN 3000 AND 5000
Correct answer C. Because the records are not sorted on that key, so every key value needs its own index entry
Correct answer A. Atomicity
Correct answer D. Durability
Correct answer B. Partially committed
Correct answer B. Read Committed
Correct answer B. R1(X) and R2(X)
Correct answer B. Edges T1 -> T2 and T2 -> T1, so S is not conflict serializable
Correct answer B. T1 must commit before T2 commits
Correct answer D. Acquire any new lock
Correct answer B. Exclusive locks are held until commit or abort, which removes cascading aborts
Correct answer B. T2 must wait until T1 releases its shared lock
Correct answer B. T1 waits for T2
Correct answer D. Aborts T and restarts it with a new timestamp
Correct answer B. Log records describing a change must reach stable storage before the changed data page does
Correct answer B. To limit how much of the log must be scanned and replayed after a crash
Correct answer C. Redo T1 and undo T2
The first part covers database fundamentals: why a DBMS is preferred to file systems, data independence, the three-schema architecture, data models and the entity-relationship model with entities, attributes, relationships, cardinality and weak entities.
The relational model section deals with super, candidate, primary, foreign and composite keys, integrity constraints, NULL values and relational algebra. Normalisation questions test functional dependencies, attribute closure, 1NF to BCNF, update anomalies and lossless decomposition.
SQL questions cover DDL, DML, DCL and TCL commands, the difference between DELETE, TRUNCATE and DROP, WHERE versus HAVING, aggregate functions and NULLs, joins, subqueries, UNION versus UNION ALL and views. The last part covers indexing with B+ trees, transactions and ACID properties, serializability, locking protocols, deadlocks and log-based recovery.
Pakistan
India
Bangladesh
DELETE is a DML command that removes selected rows and can use a WHERE clause. TRUNCATE removes all rows quickly but keeps the table structure. DROP removes the table itself, including its structure and data.
Normalisation and functional dependencies, keys, SQL queries with joins and aggregates, relational algebra, transactions and serializability, and indexing with B and B+ trees are asked most often.
Last reviewed October 2026