Note8-Storage0 - 1 CSc 134 Database Management and File...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1 CSc 134 Database Management and File Organization 8. Disk Storage Ying Jin Computer Science Department California state University, Sacramento 2 Database files Databases are stored physically as files of records Storage in disk How to organize file storage? How to access files efficiently? 3 Physical Storage Primary Storage Storage media accessed by CPU directly Secondary storage Data must be copied into primary storage, then the data can be processed by CPU Large capacity Low cost 4 Database Storage Data stored on disk is organized as files of records. A record is a collection of data values about entities and relationships. Records should be located efficiently Primary file organization How to placed files of records on the disk physically. How to access the records. Heap file (unordered files), sorted file, hashed file, B-tree Secondary organization Use alternate fields (other than the fields for primary file organization) to locate records. e.g. index. Ch14 5 Disk Device Single-sided / double-sided Disk pack Track Cylinder (tracks with the same diameter on the various surfaces in a disk pack) 6 7 Different sector organizations on disk Sectors subtending a fixed angle Sectors maintaining a uniform recording density Figure 8 Disk block Division of a track into equal-sized disk blocks (or pages) Set by OS during disk formatting Block size B=512 to 4096 bytes Blocks are the units transferred between disk and main memory for processing 9 Address of a block Buffer A contiguous reserved area in main storage that holds one block Cluster Several contiguous blocks transferred as a unit 10 Disk read/write A disk or disk pack is mounted in the disk drive A disk drive includes a motor that rotates the disk a read/write head includes an electronic component attached to a mechanical arm. Fixed-head disk Head # = track # Faster, expensive, not common Movable-head disk 11 Disk read/write (cont.) Disk drive rotates at a constant speed Move read/write head to position a right track Electronic component of the read/write head is activated to transfer the data. 12 Time to read/write Time = Seek time + position the correct track Rotational delay (Latency) + desired block rotates into position under the read/write head Block transfer time transfer data (much smaller) More efficient: transfer n consecutive blocks on the same track or cylinder....
View Full Document

This note was uploaded on 10/26/2009 for the course CSC CSC 134 taught by Professor Jinyin during the Spring '09 term at CSU Sacramento.

Page1 / 56

Note8-Storage0 - 1 CSc 134 Database Management and File...

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

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