Explain the shadow paging recovery technique.
Ans: Shadow paging is a method used to acquire atomic and durable transactions, and provides the capability to manipulate pages in a database. Throughout a transaction, the pages influenced by the transaction are copied from the database file into a workspace, like volatile memory, and modified in that workspace. While a transaction is committed, all of the pages that were altered by the transaction are written from the workspace to not used pages in the database file.
Throughout execution of the transaction, the state of the database exposed to the user is that where the database existed prior to the transaction, as the database file still consist of the original versions of the modified pages, like they existed before being copied into the workspace. If a user accesses the database previous to the transaction is complete, or on the recovery of a failure, it will come out as though the transaction has not occurred.