Question
Assume a table that uses 4096-byte blocks. If a relation has 120 rows and each row takes 50 bytes, how many blocks of storage does
- Assume a table that uses 4096-byte blocks. If a relation has 120 rows and each row takes 50 bytes, how many blocks of storage does this table require?
- If we were to index a key of 16 bytes and assuming that each pointer requires 4 bytes (also using 4096-byte blocks), how many values and pointers can fit on a single block?
- If you had exactly 1 block for an index, how many values can it index? (i.e., how many pointers can it hold?)
D.
|
If you had a four-level index (root, two intermediate levels and a leaf level), how many values can it index? (at most)
HINT: For your reference, picture above shows 3 values and 4 pointers. Assuming this many fit on a single DB page, a single-page index can index 3 values. With a two level index, it could index 12 values (4 pointers at top level, each pointing to a 3-pointer page for a total of 12 indexed values).
Note that a single page index in the example above cannot index 4 values and only indexes 3 values because each indexed entry at the leaf level is a (value, pointer) pair.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started