[prev] 88 [next]

Exercise 9: Inserting Variable-length Records

For both of the following page formats

  1. variable-length records, with compacted free space
  2. variable-length records, with fragmented free space

implement the insert() function.

Use the above page format, but also assume:

  • page size is 1024 bytes
  • tuples start on 4-byte boundaries
  • references into page are all 8-bits (1 byte) long
  • a function recSize(r) gives size in bytes