12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sec. 10.2 ISAM 363In-memoryTable ofCylinder KeysCylinder 1 Cylinder 2Cylinder CylinderIndex IndexRecordsCylinderOverflowRecordsCylinderOverflowSystemOverflowFigure 10.6 Illustration of the ISAM indexing system.in the index. Inverted lists reduce this problem, but they are only suitable for secondarykey indices with many fewer secondary key values than records. The linearindex would perform well as a primary key index if it could somehow be brokenin<strong>to</strong> pieces such that individual updates affect only a part of the index. This conceptwill be pursued throughout the rest of this chapter, eventually culminating inthe B + -tree, the most widely used indexing method <strong>to</strong>day. But first, we begin bystudying ISAM, an early attempt <strong>to</strong> solve the problem of large databases requiringfrequent update. Its weaknesses help <strong>to</strong> illustrate why the B + -tree works so well.Before the invention of effective tree indexing schemes, a variety of disk-basedindexing methods were in use. All were rather cumbersome, largely because noadequate method for h<strong>and</strong>ling updates was known. Typically, updates would causethe index <strong>to</strong> degrade in performance. ISAM is one example of such an index <strong>and</strong>was widely used by IBM prior <strong>to</strong> adoption of the B-tree.ISAM is based on a modified form of the linear index, as illustrated by Figure10.6. Records are s<strong>to</strong>red in sorted order by primary key. The disk file is dividedamong a number of cylinders on disk. 1 Each cylinder holds a section of the list insorted order. Initially, each cylinder is not filled <strong>to</strong> capacity, <strong>and</strong> the extra space isset aside in the cylinder overflow. In memory is a table listing the lowest key values<strong>to</strong>red in each cylinder of the file. Each cylinder contains a table listing the lowest1 Recall from Section 8.2.1 that a cylinder is all of the tracks readable from a particular placemen<strong>to</strong>f the heads on the multiple platters of a disk drive.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!