Chapter 8, 9- Files and Pages (9-7)

Chapter 8, 9- Files and Pages (9-7) - Storing Data: Disks...

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

View Full Document Right Arrow Icon
Database Management System, R. Ramakrishnan and J. Gehrke 1 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 2 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 3 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…
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 4 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 5 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 6 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 7 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 8 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 Rotational delay varies from 0 to 5msec Transfer rate is about 0.1-0.5msec per 4KB page Key to lower I/O cost: reduce seek/rotation delays! Hardware vs. software solutions?
Background image of page 8
Database Management System, R. Ramakrishnan and J. Gehrke 9 Arranging Pages on Disk ` Next block concept: blocks on same track, followed by blocks on same cylinder, followed by
Background image of page 9

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

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

Page1 / 32

Chapter 8, 9- Files and Pages (9-7) - Storing Data: Disks...

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

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