Files: Main Problem
Spanned vs Unspanned

In the previous example, 512 bytes can store 6 full tuples with the remaining of 32 bytes
The maximum space wasted is 50% of the block size - 1 byte
Variable-Length Tuples
-
How do we store them?

-
Reserved Space
- Reserve the maximum space for each tuple
Variable-Length Space

- Pack tuples tightly
- Q: How do we know the end of a tuple?
- At the end of the tuple, we add an "end" marker (Like null byte in C)
- Store the length of the tuple
- What to do for delete/update?
- Modify in place and shift everything back (slow)
- Delete the original tuple and add the modified one at the back → issue of fragmentation
- How can we "point to" to a tuple?
- We need block#, the beginning location of tuple
Slotted Page
