Note8-Storage1

Note8-Storage1 - 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
1 CSc 134 Database Management and File  Organization   8. Disk Storage Ying Jin Computer Science Department California state University, Sacramento
Background image of page 1

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

View Full Document Right Arrow Icon
2 Database files Databases are stored physically as files  of records Storage in disk How to organize file storage? How to access files efficiently?
Background image of page 2
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
Background image of page 3

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

View Full Document Right Arrow Icon
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
Background image of page 4
5 Disk Device Single-sided / double-sided Disk pack Track Cylinder (tracks with the same diameter  on the various surfaces in a disk pack)
Background image of page 5

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

View Full Document Right Arrow Icon
6
Background image of page 6
7 Different sector organizations on  disk Sectors subtending a fixed angle Sectors maintaining a uniform recording  density Figure
Background image of page 7

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

View Full Document Right Arrow Icon
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 
Background image of page 8
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
Background image of page 9

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

View Full Document Right Arrow Icon
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
Background image of page 10
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. 
Background image of page 11

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

View Full Document Right Arrow Icon
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. Locating data on disk is a major bottleneck
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 56

Note8-Storage1 - 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