Sunday, 8 February 2015

What is Page,Disk,Tapes,Buffer manager and Disk Space Manager?

 Overview of Storage & Indexing, Disks & Files:



1.1 Data on External Storage:

DBMS  stores  vast  quantities  of  data,  and  the  data  must  persist  across  program executions. Therefore, data is stored on external storage devices such as disks and tapes.And fetched into main memory as needed for processing.


Page:

Def : The unit of information read from or written to disk is a page.

The size of a page is a DBMS parameter, and typical values are 4KB or 8KB.

The cost of page I/O (input from disk to main memory and output from memory to disk) dominates  the  cost  of  typical  database operations,  and  database  systems  are  carefully optimized to minimize this cost.





Points to remember:

Disks:

  • Disks are the most important external storage devices.
  • Disk allows us to retrieve any page at a (more or less) fixed cost per page. However, if we read several pages in the order that they are stored physically, the cost can be much less than the cost of reading the same pages in a random order.




Tapes:



  • Tapes are sequential access devices and force us to read data one page after the other.
  • They are mostly used to archive data that is not needed on a regular basis.




Record in a file





It is one data entry stored in file, It has a unique identifier called a record id.
 A rid has the property  that we can  identify  the  disk address  of the page containing the record by using the rid.


Buffer manager:

  • It is a layer of software  to  read Data  into memory for  processing, and  written in  to disk for persistent storage.
  • When the files and file layer needs to process a page, it asks the buffer manager to fetch the page, specifying the pages rid.
  • The buffer manager fetches the page from disk if it is not already in memory.



Disk Space Manager:



  • Manages the space on disks.
  • When the files and file Layers needs additional space to hold new records in a file, it asks the disk space manager to allocate an additional disk page for the file; it also informs the disk space manager when it no longer needs one of its disk pages.
  • The disk space manager keeps track of the pages in use by the file layer, if a page is freed by  the  file  layer,  the  space  manager  tracks  this,  and  reuses  the  space  if  the  file  layer requests a new page later on.


No comments:

Post a Comment