Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views6 pages

Session03 FileProcessing

The document discusses B-Trees of order m, specifically m=4, and provides examples of inserting and deleting keys within the tree structure. It illustrates the process of inserting keys 6 through 13 and deleting keys 5 and 6, showing how the tree reorganizes after each operation. Additionally, it poses a question about B+ Trees and invites a comparison between B Trees and B+ Trees.

Uploaded by

aws1010374
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Session03 FileProcessing

The document discusses B-Trees of order m, specifically m=4, and provides examples of inserting and deleting keys within the tree structure. It illustrates the process of inserting keys 6 through 13 and deleting keys 5 and 6, showing how the tree reorganizes after each operation. Additionally, it poses a question about B+ Trees and invites a comparison between B Trees and B+ Trees.

Uploaded by

aws1010374
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

‫علوم الحاسب‬

‫الفرقة الثانية‬

‫معالجة الملفات‬
File Processing

Computer Science Department


B-Tree of m order
Example Root Each Node Each Node
Keys Keys Childs
1 : m-1 ⎾m/2⏋-1 : m-1 ⎾m/2 ⏋: m
m=4
1:3 1:3 2:4

 h=logn⎾m/2⏋
 n=> Number of keys

 m=> order

Q.1. Insert 6,7,8,9 to B Tree with order m=4


Root= 1:3 Each node keys= 1:3 Each node child=2:4

6 7 8 9

6 8 9
****************************************************
Insert 10

6 8 9 10

1|Page
Insert 11

6 8 9 10 11

7 9

6 8 10 11
****************************************************
Insert 3,4,5

7 9

3 4 5 6 8 10 11

4 7 9

3 5 6 8 10 11
****************************************************
Insert 1,2

4 7 9

1 2 3 5 6 8 10 11
2|Page
****************************************************
Insert 12,13

4 7 9

1 2 3 5 6 8 10 11 12 13

4 9 11

1 2 3 5 6 8 10 12 13
****************************************************
Delete 5

4 9 11

1 2 3 5 6 8 10 12 13

3|Page
7

4 9 11

1 2 3 6 8 10 12 13
****************************************************
Delete 6

4 9 11

1 2 3 6 8 10 12 13

3 9 11

1 2 4 8 10 12 13

4|Page
Q.2. What is B + Tree, compare between B tree and B+ tree?

5|Page

You might also like