0% found this document useful (0 votes)
510 views

Shadow Paging in DBMS Shadow Paging in SQL

Shadow paging in DBMS works by executing all transactions in memory on a shadow copy of the database. Once transactions are complete, the changes are pushed to the actual database. This prevents partial transactions from being reflected if a failure occurs. The database pointer always points to a consistent copy, either the original or shadow database. After transactions finish, the pointer switches to the new shadow copy and the old copy is deleted. Shadow paging works best for small databases with single transactions at a time to avoid disk failures and allow a shadow copy to hold the transaction data.

Uploaded by

Rajan Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
510 views

Shadow Paging in DBMS Shadow Paging in SQL

Shadow paging in DBMS works by executing all transactions in memory on a shadow copy of the database. Once transactions are complete, the changes are pushed to the actual database. This prevents partial transactions from being reflected if a failure occurs. The database pointer always points to a consistent copy, either the original or shadow database. After transactions finish, the pointer switches to the new shadow copy and the old copy is deleted. Shadow paging works best for small databases with single transactions at a time to avoid disk failures and allow a shadow copy to hold the transaction data.

Uploaded by

Rajan Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

10/11/2019 ▶ Shadow paging in DBMS - Shadow paging in SQL

Shadow paging in DBMS

This is the method where all the transactions are executed in the primary memory or the
shadow copy of database. Once all the transactions completely executed, it will be
updated to the database. Hence, if there is any failure in the middle of transaction, it will
not be reflected in the database. Database will be updated after all the transaction is
complete.

A database pointer will be always pointing to the consistent copy of the database, and
copy of the database is used by transactions to update. Once all the transactions are
complete, the DB pointer is modified to point to new copy of DB, and old copy is deleted. If
there is any failure during the transaction, the pointer will be still pointing to old copy of
database, and shadow database will be deleted. If the transactions are complete then the
pointer is changed to point to shadow DB, and old DB is deleted.
https://www.tutorialcup.com/dbms/shadow-paging.htm 1/3
10/11/2019 ▶ Shadow paging in DBMS - Shadow paging in SQL

As we can see in above diagram, the DB pointer is always pointing to consistent and
stable database. This mechanism assumes that there will not be any disk failure and only
one transaction executing at a time so that the shadow DB can hold the data for that
transaction. It is useful if the DB is comparatively small because shadow DB consumes
same memory space as the actual DB. Hence it is not efficient for huge DBs. In addition, it
cannot handle concurrent execution of transactions. It is suitable for one transaction at a
time.

Simple SQL Tutorial (https://www.tutorialcup.com/sql)

SQL Interview Questions (https://www.tutorialcup.com/sql-interview-questions)

Next > (https://www.tutorialcup.com/dbms/recovery-with-concurrent-transactions.htm)

< Prev (https://www.tutorialcup.com/dbms/data-recovery.htm)

(https://srv.carbonads.net/a
ds/click/x/GTND42QUCTSIL
2QUCAALYKQMCAYI42J7C6
YI5Z3JCWSI4KQYCTBIL23KC
6BI5K3UCAYDTK3EHJNCLSI
Z?
segment=placement:wwwtu
torialcupcom;)
Limited time offer: Get
10 free Adobe Stock
images.
(https://srv.carbonads.n
et/ads/click/x/GTND42
QUCTSIL2QUCAALYKQ
MCAYI42J7C6YI5Z3JCW
SI4KQYCTBIL23KC6BI5K
3UCAYDTK3EHJNCLSIZ
?
segment=placement:w
wwtutorialcupcom;)

ADS
?U
(HTTP://CARBONADS.NET/
TERM=CARBON)
AMPAIGN=IN_UNIT&UTM_
UM=AD_VIA_LINK&UTM_C
RIALCUPCOM&UTM_MEDI
TM_SOURCE=WWWTUTO
VIA CARBON

https://www.tutorialcup.com/dbms/shadow-paging.htm 2/3
10/11/2019 ▶ Shadow paging in DBMS - Shadow paging in SQL

https://www.tutorialcup.com/dbms/shadow-paging.htm 3/3

You might also like