√2011-09-07-Files and Pages

√2011-09-07-Files and Pages -...

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

View Full Document Right Arrow Icon
Database Management System, R. Ramakrishnan and J. Gehrke Storing Data: Disks and Files
Background image of page 1

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

View Full DocumentRight Arrow Icon
Database Management System, R. Ramakrishnan and J. Gehrke Storing and Retrieving Data Database Management Systems need to: – Store large volumes of data – Store data reliably (so that data is not lost!) – Retrieve data efficiently Alternatives for storage – Main memory – Disks – Tape
Background image of page 2
Database Management System, R. Ramakrishnan and J. Gehrke Disks Secondary storage device of choice – Cheap – Stable storage medium – Random access to data Main problem – Data read/write times much larger than for main  memory – Positioning time in order of milliseconds How many instructions could a 3 GHz CPU process during  that time… Frequency (Hz) = 1 /period (s), 3*10^9/1000 = 3*10^6
Background image of page 3

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

View Full DocumentRight Arrow Icon
Database Management System, R. Ramakrishnan and J. Gehrke Solution 1: Techniques for making                    disks faster Intelligent data layout on disk – Put related data items together Redundant Array of Inexpensive Disks (RAID) – Achieve parallelism by using many disks
Background image of page 4
Database Management System, R. Ramakrishnan and J. Gehrke Solution 2: Buffer Management  Keep “currently used” data in main memory – How do we do this efficiently? Typical (simplified) storage hierarchy: – Main memory (RAM) for currently used data – Disks 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
Database Management System, R. Ramakrishnan and J. Gehrke Outline  Disk technology and how to make disk read/writes  faster Buffer management Storing “database files” on disk
Background image of page 6
Database Management System, R. Ramakrishnan and J. Gehrke Components of a Disk  Platters  The platters spin (say, 10K rpm). Spindle  The arm assembly is moved  in or out to position  a head on  a desired track. Tracks under  heads  make    a  cylinder   (imaginary!). Disk head Arm movement Arm assembly  Only one head  reads/writes at any one  time. Tracks Sector  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
Database Management System, R. Ramakrishnan and J. Gehrke 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 10msec
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2011 for the course CS 4410 taught by Professor Vollset during the Spring '07 term at Cornell.

Page1 / 32

√2011-09-07-Files and Pages -...

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

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