Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4. 120 pts] Assume that you have just built a B+-tree index using Alternative (2) on a Heap file containing 40,000 records. That is,

image text in transcribed
Problem 4. 120 pts] 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 factor) 1% (ie, 0.01). How that satisfy the range query using this tree? Explain. query that uses this tree and has selectivity (reduction many 1/Os you need to perform in order to retrieve all the records

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions