Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

  1. 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?

  1. 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?

  1. If you had exactly 1 block for an index, how many values can it index? (i.e., how many pointers can it hold?)

D.

P1 | V1 | P2 | V2 | P3 | V3 | P4

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions