Copyright © 2004 Pearson Education, Inc.. Chapter 13 Disk Storage, Basic File Structures, and...

Post on 21-Dec-2015

223 views 4 download

Tags:

Transcript of Copyright © 2004 Pearson Education, Inc.. Chapter 13 Disk Storage, Basic File Structures, and...

Copyright © 2004 Pearson Education, Inc.

Copyright © 2004 Pearson Education, Inc.

Chapter 13

Disk Storage, Basic File Structures, and Hashing

Slide 13-3Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.1(a) A single-sided disk with read/ write hardware. (b) A disk pack with read/write hardware.

Slide 13-4Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.2Different sector organizations on disk. (a) Sectors subtending a fixed angle. (b) Sectors maintaining a uniform recording density.

Slide 13-5Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.3Interleaved concurrency versus parallel execution.

Slide 13-6Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.4Uses of two buffers, A and B, for reading from disk.

Slide 13-7Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.5Three record storage formats. (a) A fixed-length record with six fields and size of 71 bytes. (b) A record with two variable-length fields and three fixed-length fields. (c) A variable-field record with three types of separator characters.

Slide 13-8Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.6Types of record organization. (a) Unspanned. (b) Spanned.

Slide 13-9Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.7Some blocks of an ordered (sequential) file of EMPLOYEE records with NAME as the ordering key field.

Slide 13-10Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.8Internal hashing data structures. (a) Array of M positions for use in internal hashing. (b) Collision resolution by chaining records.

Slide 13-11Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.9Matching bucket numbers to disk block addresses.

Slide 13-12Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.10Handling overflow for buckets by chaining.

Slide 13-13Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.11Structure of the extendible hashing scheme.

Slide 13-14Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.12Data striping. File A is striped across four disks.

Slide 13-15Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 13.13Multiple levels of RAID. From Chen, Lee, Gibson, Katz, and Patterson (1994), ACM Computing Survey, Vol. 26, No. 2 (June 1994). Reprinted with permission.