Assume you have a table that contains 27,000 records, and you have an unclustered B+-tree index on the table. Assume further that each index node can contain up to 100 pointers.

(a) What is the maximum possible number of levels in the B+-tree index for this table? Draw a sketch of this ”maximal height” B+-tree for the 27,000 record table.

(b) What is the minimum possible number of levels in the B+-tree index for this table? Draw a sketch of this ”minimal height” B+-tree for the 27,000 record table.


(a) What is the maximum possible number of levels in the B+-tree index for this table? Draw a sketch of this ”maximal height” B+-tree for the 27,000 record table.

Solution:
Since the index is unclustered, it requires one pointer per record in the data file. The tree will have the maximal depth is the nodes of the tree are minimally packed. This means that the root has only 2 pointers and the rest of the nodes have 50 pointers. So, the maximal depth will be 1 + ceiling(log5013500) = 4

(b) What is the minimum possible number of levels in the B+-tree index for this table? Draw a sketch of this ”minimal height” B+-tree for the 27,000 record table.

Solution:
Again, the index needs 27,000 pointers. The tree has minimal depth if the nodes are maximally packed. Therefore, the min depth is ceiling(log10027000) = 3.

Computer Science & Information Technology

You might also like to view...

Go to the LINUXjournal Web site (see Table 4.1), click on the search button on the top of the page. You can enter any search criteria subject you want pertaining to LINUX, and you will get a listing of articles that are pertinent to this subject. Search for articles on Linux Torvalds. How many are there?

What will be an ideal response?

Computer Science & Information Technology

The SUM function adds all numbers in a range of cells

Indicate whether the statement is true or false

Computer Science & Information Technology

In Project 2013, the Status date is today's date as determined by your computer's clock

Indicate whether the statement is true or false

Computer Science & Information Technology

The panels that make up the façade of the Guggenheim Museum in Bilbao, Spain are made of _________.

a. silver b. aluminum c. titanium d. bronze

Computer Science & Information Technology