M358 - Storage Device
fellstrider.com - the logo!
Home| OU Study Rooms | M358 Index | Block 1 - Information Systems | Block 2 - Relational Theory | Block 3 - SQL | Block 4 - Database Development | Block 5 - Database Issues
 
Database Storage

Storage Model

A table can be stored as a single file with each row represented by a record. Columns are fields within the record.

Some DBMS will store multiple tables (complete databases) in a single file.

The simple approach is to use the OS file organization and access systems. This can become restrictive as a database size and complexity increases.

The alternative is not to use the OS file organization and access systems. Using an OS's primitive disk management operations allows the DBMS to retain complete control of row placement within the disk.

Disk manager

That part of the OS providing primitive operations of retrieving and replacing sectors on a disk. Sees the database as a collection of disk sectors (physical file). Needs to know physical disk address of a sector. Maintains mapping between block numbers and PDA.

File manager

Can be part of OS but in alternative approach is part of DBMS. Provides for retrieval, replacing, deleting of rows and adding new rows. Sees database as a collection of blocks (logical file - each block is a sector) aka pages. Blocks identified by a number. FM needs block number where a row is located. Each row has a row identifier(RID) made up of block number and some value that locates the row in that block.

Buffer manager

The buffer is that part of the memory where copies of disk sectors are maintained. The buffer manager controls allocation of memory space. Blocks that must be removed to allow incoming blocks are normally selected on an LRU basis. Blocks that have been updated and are to be removed are written back to disk prior to being overwritten by the incoming block. LRU uses past patterns as a predictor for future references. The buffer manager cannot write back any blocks that are pinned until a transaction is committed. Once a transaction is committed the blocks are subject to forced output. If a transaction is rolled back the blocks will be removed without being written back. These help to maintain database integrity.

Home| OU Study Rooms | M358 Index | Block 1 - Information Systems | Block 2 - Relational Theory | Block 3 - SQL | Block 4 - Database Development | Block 5 - Database Issues
Move on to storage structures.

Valid CSS! Valid XHTML 1.0!

Comments, suggestions, ideas to
Stuart Banner