EE 441 Data Structures Btrees example - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

EE 441 Data Structures Btrees example

Description:

EE 441 S. Ece GURAN. EE 441 Data Structures. Btrees example ... EE 441 S. Ece GURAN. BTree Example. 30. 20. 40. 10. 15. 35. 38. 25. Insert 55: ... GURAN. BTree ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 13
Provided by: eceg6
Category:

less

Transcript and Presenter's Notes

Title: EE 441 Data Structures Btrees example


1
EE 441 Data StructuresBtrees example
2
BTree Example
Insert 55 find
45
50
55
50
3
BTree Example
Insert 55 insert at leaf node Node is too big
45
50
55
50
4
BTree Example
Insert 55 move up middle key and insert
45
50
55
50
5
BTree Example
Insert 55 Split the big node fix the links
6
BTree Example
Inserted 55 Insert 37 Find
35
37
38
37
7
BTree Example
Insert 37 insert at leaf node Node is too big
35
37
38
37
40
50
37
8
BTree Example
37
40
50
Insert 55 move up middle key 37 Node is too big
35
37
38
9
BTree Example
Insert 37 move up middle key 40 and insert
37
40
50
35
37
38
10
BTree Example
Insert 37 split first big node (starting from
the root) and fix the links
35
37
38
11
BTree Example
Insert 37 split next big node and fix the links
12
BTree Notes
  • Insertion at a node with free available space for
    a key Insert the key at the right place and
    rearrange the node and sub-trees if required
  • Start insertion from the leaf level
  • Keep generating big nodes and extract the middle
    key of the big node to push it up towards the
    root
  • Keep the big nodes without splitting and keep
    propagating to the upper levels
  • Mid key might appear more than once during this
    process
  • When the last push-up operation is completed,
    start splitting the nodes and moving down
Write a Comment
User Comments (0)
About PowerShow.com