Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 9

Homework 6

Name:__Divya Patel___________
What/when/how to submit: Submit a soft copy to the assignment link by 11:59 P.M. March
31, 2015
Note: Please type your solution.
Q1. A Sailors file with sID as the key field includes records with following sID values: 71, 41, 26,
48, 31, 47, 12, 22, 74, 69,
21, 13, 43, 90, 35, 21, 62, 35, 16, 45, 54, 70, 15, 18, 67, 44, 37.
Suppose that the search field values are inserted in the given order in a B +- tree of order p =4 and pleaf
=3; show how the tree will expand and what the final tree will look like.

Answer:
Step 1: Inserting 71

Step 2: Inserting 41

Step 3: Inserting 26

Step 4: Inserting 48
Since there is no room for 48, we need to split the above obtained node.

Step 5: Inserting 31

Step 6: Inserting 47
Since there is no room for 47, we need to split the node.

Step 7: Inserting 12

Step 8: Inserting 22

Step 9: Inserting 74

Step 10: Inserting 69

Step 11: Inserting 21

Step 12: Inserting 13

Step 13: Inserting 43

Step 14: Inserting 90

Step 15: Inserting 35

Step 16: Inserting 21


21 already exists in the table

Step 17: Inserting 62

Step 18: Inserting 35


35 already exists

Step 19: Inserting 16

Step 20: Inserting 45

Step 21: Inserting 54

Step 22: Inserting 70

Step 23: Inserting 15

Step 24: Inserting 18

Step 25: Inserting 67

Step 26: Inserting 44

Step 27: Inserting 37

You might also like