Heap File
Page Header
- int freePosition
Item Header
- int size
A heap page looks like this:
|-------------|
| Page Header |
|-------------|
| |
| free space |
| |
|-------------| <-- freePosition
| Item #2 |
| data |
|-------------|
| Item #2 |
| header |
|-------------|
| Item #1 |
| data |
|-------------|
| Item #1 |
| header |
|-------------|
BTree File
BTree Item
bytes[] key
int pageNo
- the page in the heap that contains the value.
A heap page can contain many items so the heap page has to be scanned.
Example BTree page
[1, #], [7, #], [9, #]