Course contents
On this page
Lesson plan

Lesson plan 08: Physical representation

Lay out records and slot directories on a fixed-size page and compute usable capacity.

Placement: Part 2: Representing and locating data.

Prerequisites: Lesson 07: Logical models and schemas, plus the earlier dependency chain.

Learning outcomes

  • Lay out records and slot directories on a fixed-size page and compute usable capacity.
  • Trace record insertion, movement, deletion, and fragmentation without breaking logical identity.
  • Compare row and column layouts through the bytes and operations a workload actually needs.
  • Separate a general mechanism, a documented implementation choice, and an illustrative numerical assumption.

Teaching sequence

  1. Establish the motivating situation: An update enlarges a variable-length name and moves its bytes without invalidating a stable slot identifier.
  2. Introduce the vocabulary and the correctness obligation before an optimization. Define records, pages, heaps.
  3. Develop the mechanism: Draw a page, account for headers and slots, then explain versioned formats and safe bounds checking.
  4. Follow the complete worked example: An 8192-byte page with 24-byte header and 104-byte row-plus-slot fits 78 rows. Explain the assumptions, intermediate units, and limiting interpretation.
  5. Extend the scenario to changed load, skew, or failure, explaining slotted pages, row layout, column layout, encoding, compression, fragmentation.
  6. Connect the mechanism to a documented implementation and an alternative with a different workload fit. Close by stating the remaining cost and the next lesson dependency.

Required chapter material

Use a complete execution trace or worked calculation, supported by an annotated static diagram or table. Include language-neutral pseudocode or labeled SQL when it clarifies the mechanism. State preconditions, ownership, visibility, and failure boundaries for algorithms. Describe operational costs as well as the normal path. All questions raised in the narrative must be resolved in the text.

Visual explanation

An annotated slotted page labels the header, slot array, record area, and free space; its capacity calculation accounts for every byte. The accompanying prose explains the arrows, state changes, or table entries so the lesson remains understandable in a plain Markdown reader.

Editorial checks

Confirm that the numerical example agrees with its units and assumptions. Check that a faster path preserves the stated contract, or explicitly identify the changed guarantee. Keep hypothetical figures separate from product measurements. Explain both an appropriate use and a limitation of the case design. Check terminology against the glossary and links against the course index.

Primary source set

Read the lesson · Curriculum