Stair-Step Access Tables
Yet another kind of table access is the stair-step method. This access method isn't as direct as an index structure, but it doesn't waste as much data space.
The general idea of stair-step structures, illustrated in Figure 18-5, is that entries in a table are valid for ranges of data rather than for distinct data points.
![The stair-step approach categorizes each entry by determining the level at which it hits a "staircase." The "step" it hits determines its category](/api/v2/epubs/0735619670/files/httpatomoreillycomsourcemspimages822549.png)
Figure 18-5. The stair-step approach categorizes each entry by determining the level at which it hits a "staircase." The "step" it hits determines its category
For example, if you're writing a grading program, the "B" entry range might be from 75 percent to 90 percent. Here's a range of grades you might have ...
Get Code Complete, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.