You are on page 1of 36

Secondary

storage devices

Shashwat Shriparv
dwivedishashwat@gmail.com
InfinitySoft
Storage of databases
 Databases typically store large amount of data.
 Generally databases are too large to fit entirely
in the main memory.
 Storage of database in secondary storage
devices such as disks prevent permanent data
loss from volatile memory (main memory).
 Cost of storage per unit data less than that of
primary memory.
Typical devices
 Magnetic tapes
 Optical disks
 Hard disks
Magnetic
Tapes
Hard disk drive
Accessing methods
 Data stored on tapes is offline since loading of
tape is needed before the data becomes
available-by an operator or a loading device
 Disks are online devices that can be accessed
directly at any time.
 Due to these factors disks are most widely
used as secondary storage devices of
DATABASE MAMAGEMENT SYSTEMS
DISK DEVICES
 Magnetic disks are used for storing data
 By magnetizing an area on a disk one can
make it represent a bit value of one or zero
 capacity of the disk is the number of bytes it
can store
 Usually the capacity of disks are too large.
 Floppies can contain 400KB to 1.44Mb
 Hard disks can accommodate hundreds of GBs
 Disks are all made of magnetic material
shaped as thin circular disk and protected by a
plastic or acrylic cover
 A disk is single sided if it stores information
only on one of its surfaces

 A disk is double sided if both surfaces are used


 To increase storage capacity disks are
assembled into a disk pack which may include
many disks and hence many surfaces.

1998 Seagate Technologies


A HARD DISK FROM IBM AT 1996
 Data is stored on a disk surface in concentric
circles of small width-each having a distinct
diameter.

 Each circle is called a track

 For disk packs the tracks with same diameter


on various surfaces are called a cylinder
because the shape they would form if
connected in space
• Number of tracks on disk ranges from few
hundred to a few thousand
• Each track typically ranges from tens of
KB to 150KB
• Because a track usually contains large
amount of information, it is divided in to
smaller blocks called sectors.
• The division of a track into sectors is hard
coded on the disk surface and cannot be
changed.
 One type of sector organization is a portion of
a track that subtends a fixed angle at the center
of a sector.

 A technique called zone bit recording allows a


range of cylinders to have the same number of
sectors per arc.

 Sectors maintaining a uniform recording


density is also possible. Then the number of
sectors will be different in each track to
preserve the density.
Formatting
 The division of a track into equal sized blocks
is set by the operating system during the disk
formatting process.

 Block size is fixed during formatting and


cannot be changed dynamically
 Typical block size: 512 to 4096 bytes
 A disk with hard coded sectors often has the
sectors subdivided into blocks during
formatting.
 Blocks are separated by fixed size inter block
gaps which include coded control information
that gives the identification of the block after
that gap.
 A disk is a random addressable device.
 Transfer of data between main memory and
disk takes place in blocks.
 Hardware address of a block is a
combination of
1. Cylinder number
2. Track number
3. Block Number
 In modern disk drives LBA is used.
 Buffer is the interface storage area between
disk drive mechanism and main memory.
 Read operation
 Write operation
 Cluster is several contiguous blocks.
Hardware mechanism

 Read/write head reads a block


 Read/write head is attached to a mechanical arm.
 Disk packs with multiple disks are controlled
by several read/write heads.
 All arms are connected to an actuator attached
to another electrical motor that positions the
head.
 Disks with fixed read/write heads with as
many as heads as are called fixed-head disks.
 Disk units with an actuator are called
movable-head disks.
 Disk controller is usually embedded in disk
drive.
 SCSI-one of the std. interface for disk drives.
 Seek time- time required to position the head
on correct track. [ typical 3to8ms]
 Latency-time required for the desired block to
rotate into position
 Block transfer time-time to transfer a block of
data
 Total time needed to locate and transfer an
arbitrary block is the sum of these times.
Magnetic Tape Storage Devices
 Magnetic tapes are sequential access devices
 Data is stored on reels of high capacity
magnetic tape
 A tape drive is required to drive the tape reel
 A read/write head is used to read or write data
on tape.
 Data records are stored as blocks
 Typical data densities are 1600 to 6250 bytes
per inch
 Inter block gap of .6 inches corresponds to 960
to 3750 bytes of wasted storage.
 To get a block on the middle of the tape, entire
tape is to be scanned and until the required
block gets under the head.
 Tape access is slow and therefore not used
store online data.
 Tapes have the important function of backing
up the database.
 One reason for tape back up is to keep the data
in case of a disk crash
 Disk crash can happen if the read write head
touches the surface because of mechanical
malfunction
 Tapes can also be used to store excessively
large databases.
 Outdated, but need to be kept records are
usually stored on tape drives.
 Different capacity tape drives are available.

 Digital and super digital linear tapes having


capacities of hundreds of GBs that record data
on linear tracks are also used.
 Robotic arms are used to write multiple
catridges in parallel using multiple tape drives
with automatic labeling to identify backup.
Shashwat Shriparv
dwivedishashwat@gmail.com
InfinitySoft

You might also like