Database Recovery Techniques - recovery management, backup and restore strategies - Question Bank

1. What is the principle of 'durability' in ACID properties, and how do recovery techniques ensure it?
A) Transactions are isolated; recovery ensures committed transactions are permanent.
B) Transactions are consistent; recovery ensures committed transactions are permanent.
C) Transactions are atomic; recovery ensures committed transactions are permanent.
D) Committed transactions are permanent, even in the face of system failures; recovery techniques ensure this through logging and backups.
2. What is the concept of 'atomicity' in the context of database transactions and recovery?
A) All parts of a transaction must be executed successfully.
B) A transaction can be partially completed.
C) A transaction's changes are visible to other transactions immediately.
D) A transaction must be fast.
3. Which recovery technique is generally considered simpler to implement but can be less efficient for large databases due to the overhead of page copying?
A) Immediate Update
B) Deferred Update
C) Shadow Paging
D) Checkpointing
4. What is the main drawback of performing backups too infrequently?
A) Increased storage costs
B) Longer restore times
C) Higher risk of significant data loss
D) Slower transaction processing
5. Why is it important to test the restore process regularly?
A) To verify that backups are being created correctly and can be used to recover the database
B) To improve the speed of backups
C) To reduce the size of the database
D) To comply with new security regulations
6. What is the primary goal of a 'full backup' strategy?
A) To minimize backup time
B) To ensure that all data is captured in a single backup set for easy restoration
C) To reduce storage space
D) To only back up recently modified data
7. What is the role of 'ARIES' (Algorithm for Recovery and Isolation Exploiting Semantics) in database recovery?
A) It is a specific type of database hardware.
B) It is a sophisticated log-based recovery algorithm that combines undo and redo operations efficiently.
C) It is a technique for data compression.
D) It is a method for network security.
8. Which of the following best describes a 'transaction' in a database system from a recovery perspective?
A) A single SQL query.
B) A sequence of operations that must be executed atomically (all or nothing).
C) A user login session.
D) A scheduled database maintenance task.
9. What is the main advantage of using a separate storage system for backups and transaction logs?
A) Increased database performance
B) Reduced risk of losing backup/log data if the primary storage fails
C) Simplified database administration
D) Faster query execution
10. In the context of Immediate Update recovery, what is the purpose of the 'undo' list maintained for each transaction?
A) To store changes that need to be redone upon recovery.
B) To store information required to reverse the transaction's effects.
C) To track committed transactions.
D) To record the start time of the transaction.
11. What is the purpose of 'block-level' recovery?
A) To recover individual transactions.
B) To recover specific blocks or pages of the database that are corrupted.
C) To restore the entire database from a full backup.
D) To undo all changes made by a user.
12. Which of the following is a common strategy to ensure that log records are safely stored before data modifications are committed?
A) Write data first, then log.
B) Write log to stable storage before writing data to disk.
C) Write data and log concurrently.
D) Write log only after data is confirmed on disk.
13. What is the role of the 'System Log' (or transaction log) in database recovery?
A) To store user preferences.
B) To record all operations that modify the database state, enabling undo and redo.
C) To maintain a history of executed queries.
D) To provide audit trails for security.
14. What is the main challenge in implementing the Shadow Paging technique?
A) Managing the complexity of undo operations.
B) The overhead of creating and managing shadow pages, especially with large databases.
C) Ensuring log records are written before data.
D) Handling concurrent access during backup.
15. What is the fundamental difference between a 'backup' and a 'log file' in recovery management?
A) Backups are for restoring the entire database, while log files record changes for finer-grained recovery.
B) Log files are only used for failed transactions, while backups are for complete system restores.
C) Backups capture the current state, while log files capture the history of changes.
D) All of the above.
16. Which type of failure requires the longest recovery time, assuming all other factors are equal?
A) Transaction failure
B) System crash
C) Disk failure affecting database files
D) Network failure
17. What is the purpose of archiving transaction logs?
A) To reduce the size of the active log files
B) To store historical log data for long-term retention and auditing
C) To speed up database recovery
D) To delete old transaction records
18. In Shadow Paging, if a system crash occurs during the write of a new page, what is the state of the database after recovery?
A) The new page contains corrupted data.
B) The database reverts to the state before the transaction began.
C) The new page is partially written.
D) The transaction is automatically committed.
19. Which of the following is NOT a characteristic of stable storage, which is ideal for storing log files?
A) It survives failures.
B) It is slow to write to.
C) It is reliable.
D) It ensures data durability.
20. What does Recovery Time Objective (RTO) refer to in disaster recovery planning?
A) The maximum acceptable amount of data loss
B) The maximum acceptable time to restore the database after a failure
C) The time taken to perform a full backup
D) The frequency of transaction commits
21. Which of the following is a critical factor in determining the frequency of backups?
A) The number of users accessing the database
B) The acceptable amount of data loss (Recovery Point Objective - RPO)
C) The speed of the network connection
D) The size of the database indexes
22. What is a 'cold backup' in database terminology?
A) A backup taken while the database is online and operational
B) A backup taken when the database is shut down and offline
C) A backup that is performed very quickly
D) A backup that is encrypted
23. What is a 'hot backup' in database terminology?
A) A backup taken while the database is offline
B) A backup taken while the database is online and operational
C) A backup of only the data files
D) A backup of only the log files
24. If a transaction is aborted before it commits, which recovery operation is performed?
A) Redo
B) Undo
C) Commit
D) Backup
25. Consider a scenario where a system crashes after a transaction has committed, but before the changes are written to the main database file on disk. Which recovery operation is essential to ensure data consistency?
A) Undo
B) Redo
C) Rollback
D) Checkpointing
26. What is the 'recovery manager' component in a DBMS responsible for?
A) Executing user queries
B) Managing transaction concurrency
C) Ensuring database consistency after failures using logs and backups
D) Designing database schemas
27. Which of the following is a common strategy for storing transaction logs?
A) In the same disk as the database files
B) On a separate, highly reliable storage medium
C) In main memory only
D) Encrypted within the database itself
28. What is 'transaction commit'?
A) The process of undoing the changes made by a transaction
B) The process of permanently making a transaction's changes to the database
C) The process of backing up the database
D) The process of aborting a transaction
29. What is 'transaction rollback'?
A) The process of committing a transaction
B) The process of undoing the changes made by a transaction
C) The process of creating a backup
D) The process of querying the database
30. In a system using Immediate Update recovery, if a transaction fails before committing, what must be done?
A) The transaction's changes are automatically discarded.
B) The transaction's changes must be undone using the log.
C) The entire database must be restored from backup.
D) A new transaction must be started to cancel the changes.
31. What is the role of the 'redo' operation in log-based recovery?
A) To reverse the effects of transactions that did not commit
B) To reapply changes from committed transactions that were lost
C) To delete corrupted data blocks
D) To compress the database
32. What is the role of the 'undo' operation in log-based recovery?
A) To reapply changes from committed transactions that were lost
B) To reverse the effects of transactions that did not commit
C) To write new data to the database
D) To create a backup of the transaction log
33. Which of the following is a potential issue with frequent checkpointing?
A) Increased risk of data loss
B) Slower transaction processing due to I/O overhead
C) Larger log file sizes
D) Inability to perform rollbacks
34. What is the 'Write-Ahead Logging' (WAL) principle in database recovery?
A) All database updates must be written to disk before the transaction commits.
B) All log records must be written to stable storage before the corresponding data block is written to disk.
C) All data blocks must be written to disk before the log records are written.
D) Log records are written only after the transaction completes successfully.
35. To restore a database from a full backup and subsequent incremental backups, what is the minimum set of backups required?
A) The full backup and the latest incremental backup
B) All incremental backups
C) The full backup and all incremental backups in order
D) Only the latest incremental backup
36. To restore a database from a full backup and subsequent differential backups, what is the minimum set of backups required?
A) The full backup and the latest differential backup
B) All differential backups
C) The full backup and all differential backups
D) Only the latest differential backup
37. What is the 'restore' process in database management?
A) The process of applying new data to the database
B) The process of copying data from a backup to the database
C) The process of optimizing database indexes
D) The process of deleting old data from the database
38. What is the main advantage of performing incremental or differential backups over full backups?
A) Faster backup times and less storage space
B) Simpler restore process
C) Better data compression
D) Improved data integrity during backup
39. A 'differential backup' copies all data that has changed since the last:
A) Full Backup
B) Incremental Backup
C) Differential Backup
D) Transaction Log Backup
40. Which type of backup copies only the data that has changed since the last backup?
A) Full Backup
B) Incremental Backup
C) Differential Backup
D) Transaction Log Backup
41. What is the primary purpose of a 'backup' in database management?
A) To speed up transaction processing
B) To create a copy of the database for disaster recovery or historical purposes
C) To compress database files
D) To enforce data security policies
42. What is the main advantage of Shadow Paging over log-based recovery techniques in some scenarios?
A) It requires less disk space for logs.
B) It simplifies undo operations.
C) It avoids the need for explicit undo operations for transactions that failed before committing.
D) It is faster for redo operations.
43. Which recovery technique involves creating a copy of the database pages before modifying them?
A) Immediate Update
B) Deferred Update
C) Shadow Paging
D) Log-based Recovery
44. What is the purpose of a 'checkpoint' in database recovery?
A) To mark the end of a transaction
B) To periodically save the database state and log information to disk
C) To initiate a full database backup
D) To terminate a failing transaction
45. In the Deferred Update recovery technique, when are the changes to the database actually written?
A) Immediately as they occur
B) Only after the transaction commits
C) During the next system reboot
D) When the log file is full
46. Which recovery technique uses the log file to undo the effects of incomplete transactions and redo the effects of committed transactions?
A) Shadow Paging
B) Deferred Update
C) Immediate Update
D) Checkpointing
47. What is a 'log file' in the context of database recovery?
A) A file containing user login credentials
B) A record of all database activities and changes
C) A backup of the entire database
D) A file used for indexing database tables
48. Which of the following is NOT a type of database failure that recovery techniques address?
A) Transaction failure
B) System crash
C) Disk failure
D) Network latency
49. What is the primary goal of database recovery techniques?
A) To improve query performance
B) To ensure data consistency and integrity after a failure
C) To reduce storage space requirements
D) To enhance network security