Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

homework 6 about B+ tree, Exercises of Database Programming

b + tree examples homework 6 similar toexam questions

Typology: Exercises

2022/2023

Uploaded on 05/29/2024

mehmet-dedeler
mehmet-dedeler 🇹🇷

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 353 Fall 2023
Homework 6
Due: December 4, Monday till midnight
You will use the Moodle course page for submission of this assignment
Q.1 [15 pts] Construct a B+ tree by inserting the following key values in the given order,
using the insertion algorithm discussed in the class:
92, 38, 45, 66, 82, 99, 12, 71, 53, 29
The order of the tree should be 5, i.e., each node can hold 4 search key values.
Q.2 [15 pts] Construct a B+ tree of order 3 for the sequence of key values given in Q.1.
Q.3 [15 pts] Given the following B+ tree of order 4. Draw the resulting tree after deleting the
entries with key values 44, 45, and then inserting entries with key values 15, 50, 35,
successively.
Q.4 [15 pts] Given the original B+ tree in Q.3. Draw the resulting tree after inserting an entry
with key value 10, and then deleting the entry with key value 56.
Q.5 [40 pts] Given an extendible hash structure with the hash function: h(x) = x mod 32.
The hash value of a search key is a 5-bit binary value, and the search-key values inserted
using the most significant bits of their hash values are:
40, 26, 2, 61, 67, 109, 17, 24, 33, 127, 25, 87, 14
Each bucket in the index can hold 3 search keys. Show the final contents of the hash table and
the bucket address table after all the search-key values are inserted.

Partial preview of the text

Download homework 6 about B+ tree and more Exercises Database Programming in PDF only on Docsity!

CS 353 Fall 20 23 Homework 6 Due: December 4, Monday till midnight You will use the Moodle course page for submission of this assignment Q.1 [ 15 pts] Construct a B+ tree by inserting the following key values in the given order, using the insertion algorithm discussed in the class: 92, 38, 45, 66, 82, 99, 12, 71, 53, 29 The order of the tree should be 5, i.e., each node can hold 4 search key values. Q.2 [15 pts] Construct a B+ tree of order 3 for the sequence of key values given in Q.. Q.3 [ 15 pts] Given the following B+ tree of order 4. Draw the resulting tree after deleting the entries with key values 44, 45, and then inserting entries with key values 15, 50, 35, successively. Q.4 [ 15 pts] Given the original B+ tree in Q.3. Draw the resulting tree after inserting an entry with key value 10 , and then deleting the entry with key value 56. Q. 5 [ 40 pts] Given an extendible hash structure with the hash function: h(x) = x mod 32. The hash value of a search key is a 5-bit binary value, and the search-key values inserted using the most significant bits of their hash values are: 40, 26, 2, 61, 67, 109 , 17, 24, 33 , 127, 25, 87, 14 Each bucket in the index can hold 3 search keys. Show the final contents of the hash table and the bucket address table after all the search-key values are inserted.