1 / 70

CPS216: Data-intensive Computing Systems

CPS216: Data-intensive Computing Systems. Operators for Data Access (contd.) Shivnath Babu. Insertion in a B-Tree. n = 2. 49. 36. 49. 15. Insert: 62. Insertion in a B-Tree. n = 2. 49. 36. 49. 62. 15. Insert: 62. Insertion in a B-Tree. n = 2. 49. 36. 49. 62. 15. Insert: 50.

garima
Download Presentation

CPS216: Data-intensive Computing Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPS216: Data-intensive Computing Systems Operators for Data Access (contd.) ShivnathBabu

  2. Insertion in a B-Tree n = 2 49 36 49 15 Insert: 62

  3. Insertion in a B-Tree n = 2 49 36 49 62 15 Insert: 62

  4. Insertion in a B-Tree n = 2 49 36 49 62 15 Insert: 50

  5. Insertion in a B-Tree n = 2 49 62 36 49 50 62 15 Insert: 50

  6. Insertion in a B-Tree n = 2 49 62 36 49 50 62 15 Insert: 75

  7. Insertion in a B-Tree n = 2 49 62 36 49 50 62 75 15 Insert: 75

  8. Insertion

  9. Insertion

  10. Insertion

  11. Insertion

  12. Insertion

  13. Insertion

  14. Insertion

  15. Insertion

  16. Insertion

  17. Insertion

  18. Insertion

  19. Insertion: Primitives • Inserting into a leaf node • Splitting a leaf node • Splitting an internal node • Splitting root node

  20. Inserting into a Leaf Node 58 54 57 60 62

  21. Inserting into a Leaf Node 58 54 57 60 62

  22. Inserting into a Leaf Node 58 54 57 58 60 62

  23. Splitting a Leaf Node 61 54 66 54 57 58 60 62

  24. Splitting a Leaf Node 61 54 66 54 57 58 60 62

  25. Splitting a Leaf Node 61 54 66 54 57 58 60 61 62

  26. Splitting a Leaf Node 59 61 54 66 54 57 58 60 61 62

  27. Splitting a Leaf Node 61 54 59 66 54 57 58 60 61 62

  28. Splitting an Internal Node … 21 99 … 59 40 54 66 74 84 [54, 59) [ 59, 66) [66,74)

  29. Splitting an Internal Node … 21 99 … 59 40 54 66 74 84 [54, 59) [ 59, 66) [66,74)

  30. Splitting an Internal Node 66 … 21 99 … [66, 99) [21,66) 40 54 59 74 84 [54, 59) [ 59, 66) [66,74)

  31. Splitting the Root 59 40 54 66 74 84 [54, 59) [ 59, 66) [66,74)

  32. Splitting the Root 59 40 54 66 74 84 [54, 59) [ 59, 66) [66,74)

  33. Splitting the Root 66 40 54 59 74 84 [54, 59) [ 59, 66) [66,74)

  34. Deletion

  35. Deletion redistribute

  36. Deletion

  37. Deletion - II

  38. Deletion - II merge

  39. Deletion - II

  40. Deletion - II

  41. Deletion - II

  42. Deletion - II Not needed merge

  43. Deletion - II

  44. Deletion: Primitives • Delete key from a leaf • Redistribute keys between sibling leaves • Merge a leaf into its sibling • Redistribute keys between two sibling internal nodes • Merge an internal node into its sibling

  45. Merge Leaf into Sibling 72 … 85 67 54 58 64 68 72 75

  46. Merge Leaf into Sibling 72 … 85 67 54 58 64 68 75

  47. Merge Leaf into Sibling 72 … 85 67 54 58 64 68 75

  48. Merge Leaf into Sibling 72 … 85 54 58 64 68 75

  49. Merge Internal Node into Sibling … 59 … 41 63 74 48 52 [52, 59) [59,63)

  50. Merge Internal Node into Sibling … 59 … 41 48 52 59 63 [52, 59) [59,63)

More Related