lecture11 - Storage and Indexes Architecture of a DBMS...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Storage and Indexes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Architecture of a DBMS
Background image of page 2
Classification of Physical Storage Media • Speed with which data can be accessed • Cost per unit of data • Reliability – data loss on power failure or system crash – physical failure of the storage device • Can differentiate storage into: volatile storage • loses contents when power is switched off non-volatile storage : • Contents persist even when power is switched off.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Storage Hierarchy
Background image of page 4
Why Not Store Everything in Main Memory? • Costs too much. RAM is much more expensive than disk. • Main memory is volatile. We want data to be saved between runs. • Typical storage hierarchy: Main memory (RAM) for currently used data. Disk for the main database (secondary storage). Tapes for archiving older versions of the data (tertiary storage).
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
• DBMS stores information on (“hard”) disks. – A disk is a sequence of bytes, each has a disk address . READ: transfer data from disk to main memory (RAM). WRITE: transfer data from RAM to disk. • Data are stored and retrieved in units called disk blocks or pages . Each page has a fixed size, say 512 bytes. It contains a sequence of records . Typically records in a page have the same size, say 100 bytes. Typically records implement relational tuples. Disks and Files
Background image of page 6
Components of a Disk Platters Spindle Disk head Arm movement Arm assembly Tracks Sector Arm assembly Only one head reads/writes at any one time. Block size is a multiple of sector size (which is fixed).
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Accessing a Disk Page • Time to access (read/write) a disk block: seek time (moving arms to position disk head on track) rotational delay (waiting for block to rotate under head) transfer time (actually moving data to/from disk surface) • Seek time and rotational delay dominate. Seek time varies from about 1 to 20msec Rotational delay varies from 0 to 10msec Transfer rate is about 1msec per 4KB page Accessing main memory location – 60 nanoseconds • Key to lower I/O cost: reduce seek/rotation delays!
Background image of page 8
Arranging Pages on Disk •N e x t block concept: blocks on same track, followed by blocks on same cylinder, followed by blocks on adjacent cylinder • If blocks in a file are arranged sequentially on disk (by `next’), we minimize seek and rotational delay.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
RAID • Redundant Arrays of Independent Disks – disk organization techniques that manage a large numbers of disks, providing a view of a single disk of • high capacity and high speed by using multiple disks in parallel, and • high reliability by storing data redundantly, so that data can be recovered even if a disk fails
Background image of page 10
Improvement of Reliability via Redundancy Redundancy store extra information that can be used to rebuild information lost in a disk failure • E.g., Mirroring (or shadowing ) – Duplicate every disk. Logical disk consists of two physical disks.
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 42

lecture11 - Storage and Indexes Architecture of a DBMS...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online