Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that you have just built a B+-tree index using Alternative (2) on a Heap file containing 40,000 records. That is, the actual records are

Assume that you have just built a B+-tree index using Alternative (2) on a Heap file containing 40,000 records. That is, the actual records are stored in another file outside the index that has no particular order since it is a Heap file. Also, Alternative (2) means that we have one data entry at the leaf nodes of the B+-tree for every record. The search key field for this B+-tree index is a 40-byte string, and it is a candidate key (therefore unique). Pointers (i.e., record ids and page ids) are 10-byte values. The size of one disk page is 1000 bytes. The index T was built in a bottom-up fashion using the bulk-loading algorithm, and the nodes at each level were filled up as much as possible.

1. How many levels does the resulting tree T have?

2. For each level of the tree, how many nodes are at that level?

3. How many levels would the resulting tree T have if key compression is used and it reduces the average size of each key in an entry to 10 bytes?

4. How many levels would the resulting tree T have without key compression but with all pages 70 percent full?

5. Assume that each record is 100 bytes and is stored in the Heap file with disk pages of 1000 bytes each. Assume that you use the first B+-tree T that you computed, where the nodes were filled up as much as possible. Consider now a range query that uses this tree and has selectivity (reduction factor) 1% (i.e., 0.01). How many I/Os you need to perform in order to retrieve all the records that satisfy the range query using this tree? Explain.

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

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago

Question

1 The difference between a command system and a market system.

Answered: 1 week ago

Question

4 How the market system adjusts to change and promotes progress.

Answered: 1 week ago