DB C7 Storage and File Structure
RECALL
Storage Manager:
ref
Database System Concepts and Design P560.
Overview of Physical Storage Media
Classification
-
By Speed and Cost:
-
cache: Fastest and mostly costly, volatile, managed by computer system and hardware.
-
Main-Memory: Fast, volatile, generally too small to store the entire DB.
-
Flash Memory: Non-vlatile, support read(fast), write(slow) and erase(slower).
Solid-state drive, SSD: uses
flash memory
internally to store data but provides an interface similar to amagnetic disk
, allowing data to be stored or retrieved in units of a block; such an interface is called a block-oriented interface. -
Magnetic-disk: primary medium for the long-term online storage of data, aslo called hard disk drive (HDD). The system must first move the data from
disk
tomain memory
to accessdisk
data; the data modified must be written todisk
after the designated operations. -
Optical / Tape storage: Old.
-
-
By Reliability:
- volatile storage: Data loss on power failure or system crash.
e.g
DDR2,SQR - Non-volatile storage: contents persists even the power is switched off.
- volatile storage: Data loss on power failure or system crash.
Magnetic-disk
Physical Characteristics of Disks
Each disk platter has a flat, circular shape.
- Its two
surfaces
are covered with a magnetic material, and information is recorded on the surfaces. Platters
are made from rigid metal or glass.
tracks and sectors: The disk surface is logically divided into tracks
. Tracks
are subdivided into sectors
.
- A
sector
is the smallest unit of information that can be read from or written to the disk. Sector
sizes are typically 512 bytes.- The inner
tracks
(closer to thespindle
) are of smaller length than the outertracks
;The outer tracks contain moresectors
than the innertrack
.
read–write head: