Database Management Systems
3.0 Credits
Midterm Exam Review (Qns & Ans)
2025
©2025
,1. Question:
Which normal form primarily eliminates transitive dependencies in
a relational schema?
- a. First Normal Form (1NF)
- b. Second Normal Form (2NF)
- c. Third Normal Form (3NF)
- d. Boyce-Codd Normal Form (BCNF)
ANS: c. Third Normal Form (3NF)
Rationale:
Third Normal Form (3NF) requires that every non-prime attribute
is non-transitively dependent on the primary key, thereby
eliminating transitive dependencies and reducing redundancy.
2. Question:
Which SQL clause allows for performing aggregate calculations
over a set of rows related to the current row without collapsing the
results into a single output row?
- a. GROUP BY
- b. HAVING
- c. OVER
- d. DISTINCT
ANS: c. OVER
Rationale:
Window functions using the OVER clause perform calculations
over a set of rows (a window) without grouping them into a single
row. This is useful for running totals, moving averages, etc.
3. Question:
Which transaction property ensures that either all of the
operations in a transaction are performed or none are performed?
- a. Consistency
- b. Isolation
- c. Durability
- d. Atomicity
©2025
, ANS: d. Atomicity
Rationale:
Atomicity guarantees that a transaction is all-or-nothing. If any
part of the transaction fails, the entire transaction is aborted to
maintain the integrity of the database.
4. Question:
In the ARIES recovery algorithm, which technique is used to
ensure that transactions are rebuilt correctly after a crash?
- a. Shadow paging
- b. Write-ahead logging
- c. Checkpointing
- d. Two-phase commit
ANS: b. Write-ahead logging
Rationale:
ARIES (Algorithm for Recovery and Isolation Exploiting
Semantics) relies on write-ahead logging to record all changes
before they are applied, enabling the system to redo or undo
operations during recovery.
5. Question:
Which indexing structure is most commonly employed in
relational databases to efficiently support both point queries and
range queries?
- a. Hash index
- b. Bitmap index
- c. B+ tree index
- d. R-tree index
ANS: c. B+ tree index
Rationale:
B+ tree indexes are widely used because they maintain sorted
order, which is ideal for both point and range queries, and offer
logarithmic access time.
6. Question:
©2025