Sunday, April 20, 2014

DBMS

21. Define blocks? 
The database system resides permanently on nonvolatile storage, and is partitioned into fixed-length storage units called blocks. 

22. What is meant by Physical blocks? 
The input and output operations are done in block units. The blocks residing on the disk are referred to as physical blocks. 


23. What is meant by buffer blocks? 
The blocks residing temporarily in main memory are referred to as buffer blocks. 

24. What is meant by disk buffer? 
The area of memory where blocks reside temporarily is called the disk buffer. 

25. What is meant by log-based recovery? 
The most widely used structures for recording database modifications is the log.The log is a sequence of log records, recording all the update activities in the database. There are several types of log records. 

26. What are uncommitted modifications? 
The immediate-modification technique allows database modifications to be output to the database while the transaction is still in the active state. Data modifications written by active transactions are called uncommitted modifications. 

27. Define shadow paging. 
An alternative to log-based crash recovery technique is shadow paging. This technique needs fewer disk accesses than do the log-based methods. 


28. Define page. 
The database is partitioned into some number of fixed-length blocks, which are referred to as pages. 

29. Explain current page table and shadow page table. 
The key idea behind the shadow paging technique is to maintain two page tables during the life of the transaction: the current page table and the shadow page table. Both the page tables are identical when the transaction starts. The current page table may be changed when a transaction performs a write operation. 

30. What are the drawbacks of shadow-paging technique? 
• Commit Overhead 
• Data fragmentation 

• Garbage collection 

30. Define garbage collection. 
Garbage may be created also as a side effect of crashes. Periodically, it is necessary to find all the garbage pages and to add them to the list of free pages. This process is called garbage collection. 

31. Differentiate strict two phase locking protocol and rigorous two phase locking  protocol. 
In strict two phase locking protocol all exclusive mode locks taken by a transaction is held until that transaction commits. 
Rigorous two phase locking protocol requires that all locks be held until the transaction commits. 

32. How the time stamps are implemented 
• Use the value of the system clock as the time stamp. That is a transaction’s time stamp is equal to the value of the clock when the transaction enters the system. 
• Use a logical counter that is incremented after a new timestamp has been assigned; that is the time stamp is equal to the value of the counter. 

33. What are the time stamps associated with each data item? 
• W-timestamp (Q) denotes the largest time stamp if any transaction that executed WRITE (Q) successfully. 
• R-timestamp (Q) denotes the largest time stamp if any transaction that executed READ (Q) successfully. 

No comments:

Post a Comment