B+ Trees Basics 2 (insertion)

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024
  • This video covers insertions into B+ trees

ความคิดเห็น • 118

  • @Wretbornify
    @Wretbornify 7 ปีที่แล้ว +73

    This is so perfectly pedagogical that I almost started crying, thank you.

    • @benjay5655
      @benjay5655 3 ปีที่แล้ว +1

      Instablaster

    • @kkyars
      @kkyars ปีที่แล้ว +1

      yes, particularly when he gives time to do practice questions AND when he presents the prerequesites at the start!

  • @RonilBhatiaMusic
    @RonilBhatiaMusic 5 ปีที่แล้ว +10

    Really great series on B+ trees. I love how specifically you speak and that you carefully choose all of your words to be extremely precise. Thank you.

  • @terran008
    @terran008 9 ปีที่แล้ว +45

    Man you're a genius! Thanks a lot, my prof explained that I didn't get anything but I just watched your video and now I get it! thanks really

  • @orestis4341
    @orestis4341 8 ปีที่แล้ว +7

    Best video ever on B+trees ! Thank you very much sir ! Greetings from Athens,Greece

  • @shapeletter
    @shapeletter 8 ปีที่แล้ว +5

    Glad I found this. Two days before an exam and this helped me understand a whole new subject completely :D

  • @GeekdomCentral
    @GeekdomCentral 4 ปีที่แล้ว +1

    I know that this video is very old, but I just wanted to leave a comment and say thank you so much! My teacher didn't really go over insertions very well, so I didn't understand why nodes would split in certain ways and why some keys would copy up while others moved. Your explanation for why that happens made it all click.

  • @whyttea394
    @whyttea394 5 หลายเดือนก่อน

    Douglas, thank you! I need this visual explanation with every step along the way explained!

  • @wombatpandaa9774
    @wombatpandaa9774 ปีที่แล้ว

    Thank you for this, this was the best video I've seen for insertion in a b+ tree online!

  • @etiennedursel1424
    @etiennedursel1424 ปีที่แล้ว

    it took me more time to find your video among all the not-understandable ones than to to understand once I found it. Thanks.

  • @hishamjuneidi6185
    @hishamjuneidi6185 5 ปีที่แล้ว

    First time in my life I comment on a youtube. You deserve it. Thanks

  • @yunanzhang392
    @yunanzhang392 5 ปีที่แล้ว +1

    This is so helpful with the adv. database I am currently studying. Thanks for the detailed demo!!

  • @megan55121
    @megan55121 5 ปีที่แล้ว +1

    This video is great! It has helped me SO MUCH while studying for my graduate databases course! Thank you!

  • @iamhumanbeing7
    @iamhumanbeing7 6 ปีที่แล้ว +1

    Thank you for the step-by-step and clear explanation!!!

  • @silla1343
    @silla1343 5 หลายเดือนก่อน

    When someone really knows, even baby can understand! Thanks 👌🙏

  • @mrblack00444
    @mrblack00444 10 ปีที่แล้ว +1

    Clear and simple. Exactly what I needed. Thanks!

  • @Chiplis
    @Chiplis 7 ปีที่แล้ว

    Just saved me! Was having some trouble understanding insertion when overflow occurs, great video!

  • @pdhital100
    @pdhital100 11 ปีที่แล้ว

    Best video for quick knowledge about B+ tree.Thanks for uploading.

  • @deepakkumar-ye7gb
    @deepakkumar-ye7gb 8 ปีที่แล้ว +4

    That is a great way to make us do things (pause is necessary :D )..and yes, lucidly explained..thanks a lot

  • @ruibritopt
    @ruibritopt 10 ปีที่แล้ว +1

    Thank your for sharing your knowledge in such a simple and understandable way.

  • @dopewalt3r916
    @dopewalt3r916 9 ปีที่แล้ว +1

    You are a champion mate. Thanks a lot Mr Douglas

  • @Swenthorian
    @Swenthorian 5 ปีที่แล้ว

    This was very handy! I was trying to get a better understanding of btrfs's underlying data structure, and this video did the trick!

  • @sarastanway8861
    @sarastanway8861 6 ปีที่แล้ว +1

    love this! thanks for the very clear explanation, your videos are a great resource

  • @2everywhere285
    @2everywhere285 8 ปีที่แล้ว +2

    thank you so much sir!!! Your lecture video helps me a lot. You are a legend!!!

  • @erighlewerough
    @erighlewerough 10 ปีที่แล้ว

    Thanks a lot for this video Sir, you are very good at explaining things! Today I'm having an exam at Data base subject, and this video helped me a lot! Thank you!

  • @scally9341
    @scally9341 ปีที่แล้ว

    Amazing. Still helping people in 2023

  • @EzDoesntExist
    @EzDoesntExist 3 ปีที่แล้ว

    10X better than my school professor. Hats off!

  • @Graxer
    @Graxer 11 ปีที่แล้ว

    Fantastic explanation! Just what I needed for upcoming exams!

  • @priyankachadalavada9608
    @priyankachadalavada9608 7 ปีที่แล้ว

    Thank you Douglas! Very well explained. Great help :)

  • @douglasfisher7586
    @douglasfisher7586  11 ปีที่แล้ว +1

    Excellent question! If nothing was ever deleted from the tree, then you are right that we would expect that every key that appears in an internal node would also be present in a leaf (but not vice versa obviously). So, withOUT deletes, we'd expect 30* as a leaf, and also 13*. But, even though I don't address deletions, the example trees that I show assume that deletions might have occurred, and when you delete a 30*, for example, you would not (necessarily) delete the 30 in an internal node

  • @SravaniVadlamani
    @SravaniVadlamani 11 ปีที่แล้ว +1

    Thank you so much.This is exactly what i needed. :)

  • @lefayhalefay
    @lefayhalefay 9 ปีที่แล้ว +2

    NO Words, JUST YOU ARE THE BEST!

  • @xWINfinity
    @xWINfinity 7 ปีที่แล้ว

    Literally only decent video on youtube about this subject that's not in indian english... Crazy. Too bad it's not a dynamic video but still really helpful

  • @sushmitanigam4979
    @sushmitanigam4979 7 ปีที่แล้ว +3

    please make a video on B+ tree deletion also. Noone can explain better than u. Awesome lecture.

  • @Rafaelllel
    @Rafaelllel 8 ปีที่แล้ว +14

    i really much impressed. thank you . before watching this video, i'd like to almost die. (final exam i have..)

  • @androiddevelopment3840
    @androiddevelopment3840 6 ปีที่แล้ว

    Explanation on point. I recommend this video

  • @chuongn.645
    @chuongn.645 7 ปีที่แล้ว

    Very clear lecture, well done. Thank you so much.

  • @wonkyochoe2093
    @wonkyochoe2093 8 ปีที่แล้ว

    Clear voice and explanation. Thanks

  • @phoenixpan9656
    @phoenixpan9656 8 ปีที่แล้ว

    Thank you for the explanation about copy and removal!

  • @kcaktr
    @kcaktr 10 ปีที่แล้ว +1

    this is amazing work answers all of my question thanks so much

  • @darkmatrix100
    @darkmatrix100 11 ปีที่แล้ว

    Very clear and very simple. Thank you sir!

  • @paulpin2204
    @paulpin2204 5 ปีที่แล้ว

    Thank you for the video! It saved my grades

  • @jammydodger1449
    @jammydodger1449 8 ปีที่แล้ว

    Thanks Douglas! Great help!

  • @kasunjayananda3389
    @kasunjayananda3389 11 ปีที่แล้ว

    simple but best one.. save my time..
    good luck..

  • @jbboyne
    @jbboyne 7 หลายเดือนก่อน

    You have saved me from trying to imagine the meaning that my prof's garbled teaching about this intended to convey. It's really not hard to understand when *you* explain it.

  • @firstnamelastname4685
    @firstnamelastname4685 3 ปีที่แล้ว

    wow amazing demo for insertion, would like demo for deletion too

  • @Jane-mm2eu
    @Jane-mm2eu 9 ปีที่แล้ว +7

    Hello, thanks for sharing your learnings. I have a question in inserting 8 into the tree. In the root node there's a key 13. But in the leaves of the same tree, no key 13. Is that a misdrawing?

    • @jnapp18
      @jnapp18 8 ปีที่แล้ว +1

      +Jane Choi you are absolutely right. I am also confused by this as 13* should be in a leaf node

    • @shapeletter
      @shapeletter 8 ปีที่แล้ว

      Error: Node overflow unhandled

    • @Muhammad-pk8fi
      @Muhammad-pk8fi 5 ปีที่แล้ว

      No its not. Its basically, in the given state of the tree, there would have been a possibility that the node is pushed up instead of copied up, and only represented once in the index.

  • @ppcris2905
    @ppcris2905 5 ปีที่แล้ว

    DAMN!! A LOT BETTER MY ******* INSTRUCTOR....THANKS

  • @Amidejeune
    @Amidejeune 11 ปีที่แล้ว

    thank you very much, you save my time

  • @majoro7251
    @majoro7251 8 ปีที่แล้ว

    THANK YOU SO ****ing MUCH! exam starts now and this is the only thing that confused me. :D

  • @johnernest8109
    @johnernest8109 4 ปีที่แล้ว

    Oh thank you, redistribution of keys was actually a concern of mine when trying to conceptualize making a functional B+Tree algorithm, mentally I've kept thinking, "well I'm going to have to redistribute at the root node and so what is an efficient algorithm for doing so?"

  • @tylercruz9811
    @tylercruz9811 10 ปีที่แล้ว +1

    Contrary to you belief, there aren't any videos on B+ tree deletion. I've only found B tree deletion. Everyone seems to be avoiding it

  • @sadikieschiekov1337
    @sadikieschiekov1337 10 ปีที่แล้ว

    very very good explanation sir. good video.
    thanks alot!!

  • @christopher_deer
    @christopher_deer 6 หลายเดือนก่อน

    Thank you very much!
    Can someone explain to me, at the point when "19" is copied up for the first time and the root is full after and with the root split "19" moves up again, why is there no remaining copy on that second level of "19" in the right split? (as shown in 4:50)

  • @bosmer3836
    @bosmer3836 4 ปีที่แล้ว

    great vid, thanks!

  • @albertpop9243
    @albertpop9243 4 ปีที่แล้ว

    Fantastic video

  •  3 ปีที่แล้ว

    Great video. The case of the very first insert (though trivial) should also be presented for completion though

  • @mosessu306
    @mosessu306 4 ปีที่แล้ว

    It helps! Thanks, Fisher @Douglas Fisher

  • @EricRini
    @EricRini 8 ปีที่แล้ว

    Thank you for this video.

  • @coop4476
    @coop4476 4 ปีที่แล้ว

    This is perfect. Wow

  • @AnkurVarsheny
    @AnkurVarsheny 10 ปีที่แล้ว +1

    very good explanation on insertion, but the b-tree to begin with is wrong. Any parent key has to be present in one of the leaf nodes.

    • @gustavosilveira1802
      @gustavosilveira1802 9 ปีที่แล้ว

      but this can happen if you remove that key, no? I mean, you insert 5, then 5 is the key, but if you remove 5, 5 keep being the key, no?

  • @sandyndemma
    @sandyndemma 8 ปีที่แล้ว +1

    There is an error. There is no '30' in the lowermost level.The pointer to the right of 30 in Level 1 must point to {30,33,34}

    • @douglasfisher7586
      @douglasfisher7586  8 ปีที่แล้ว +4

      Hi, Sandipan -- this video does not cover DELETION, and as I have responded a couple of years ago, it possible to have a value in an internal node (like 30) that is not in a leaf (lowermost level). So the situation, as presented, is entirely possible, representing the case where a 30 was inserted in the past, and then deleted. Remember it is at a leaf that additional information that is associated with a key (like 30) is actually stored. So when that associated information (associated with 30) is deleted, it need only be deleted at the leaf. The key (30) can still remain at an internal node to direct search of the tree.
      I chose to represent such cases precisely so that learners would recognize the potential for such situations that result from insertion and then deletion. Thanks for your comment!

  • @MostafizRahman
    @MostafizRahman 10 ปีที่แล้ว

    At 4.31 the blue line from the root to the left child should point to the pointer that is left side of 5? Am I right? Or is it not necessary?

  • @manugo4
    @manugo4 8 ปีที่แล้ว

    badass voice and great video

  • @ardayurdakul5357
    @ardayurdakul5357 6 ปีที่แล้ว

    Great content!

  • @yunanzhang392
    @yunanzhang392 5 ปีที่แล้ว

    I feel it is a valuable case which derived from 1:50 case:
    Add 17* instead of 19*,
    then after the split and sort, the copy-up value should be 20,
    and the one-layer-above chart should be 13-20-24-30.
    Am I correct?

    • @yunanzhang392
      @yunanzhang392 5 ปีที่แล้ว

      If what I discribed is the correct procedure, then 1:50:
      You should not say update the "middle" value, but instead saying
      update the left-most value from the dynamic allocated node.

  • @def__init
    @def__init 5 ปีที่แล้ว

    Thank you so much, wish you were my prof

  • @jonathansum9084
    @jonathansum9084 4 ปีที่แล้ว

    Not bad, it is helpful.

  • @stk1526
    @stk1526 6 ปีที่แล้ว

    great work thanks a lot !

  • @sofiakazantzidou689
    @sofiakazantzidou689 6 ปีที่แล้ว

    really helpful !!! thank you a lot :)

  • @hervebtt1731
    @hervebtt1731 10 ปีที่แล้ว

    Great advice.
    thanks

  • @jonsnow9246
    @jonsnow9246 6 ปีที่แล้ว +1

    Why is the node size of the internal node or root node the same i.e. 4? What size should we choose?

    • @qanda1702
      @qanda1702 5 ปีที่แล้ว

      The size of the node can be anything you want, and all nodes need to have the same size. In this example the size of the nodes are 4.
      Then the B+ tree properties apply that all nodes need to be at least half full. So in this case all nodes need to contain at least 2 values.

  • @stevefrt9495
    @stevefrt9495 6 ปีที่แล้ว

    thanks, in b-tree stores key in internal node, but in b+tree stores key in leaf node

  • @geozgeoz
    @geozgeoz 7 ปีที่แล้ว

    Very helpfull . Thank you

  • @hamzafeghouli4297
    @hamzafeghouli4297 3 ปีที่แล้ว

    that's excellent

  • @abhishekjadhavar4277
    @abhishekjadhavar4277 4 ปีที่แล้ว

    At 3:28 can't we just replace 13 at the root by 8 and change to second leaf node to 8, 13, 14, 16?

  • @ameyashinde423
    @ameyashinde423 6 ปีที่แล้ว

    thank you very much problem solved

  • @MRKABOOM12
    @MRKABOOM12 5 ปีที่แล้ว

    Good video

  • @anirudh6635
    @anirudh6635 2 ปีที่แล้ว

    Thanks man

  • @daitavan297
    @daitavan297 7 ปีที่แล้ว

    How about if we select 16* instead of 19* to add to the ROOT When splitting the tree?

    • @qanda1702
      @qanda1702 5 ปีที่แล้ว

      By convention, the min value of the right child is chosen to be pushed to the root

  • @ArturoJain
    @ArturoJain 11 ปีที่แล้ว

    Great!

  • @indhupathmanathan1797
    @indhupathmanathan1797 6 ปีที่แล้ว

    thank you!

  • @chamilarathnayake
    @chamilarathnayake 11 ปีที่แล้ว

    very understandable :) Thanks

  • @InfDaMarvel
    @InfDaMarvel 9 ปีที่แล้ว

    At 4:30 AFTER you inserted 8 into the tree you added new nodes to the right sub tree without any explanation. I'm pretty sure its just a inconsistency but I found that confusing. Thanks the videos though.

    • @InfDaMarvel
      @InfDaMarvel 9 ปีที่แล้ว

      Which would mean that its the tree after you inserted 8 and added two more nodes.

  • @maramalhu2456
    @maramalhu2456 3 ปีที่แล้ว

    يسلم من ربااااااك

  • @gardmikael
    @gardmikael 11 ปีที่แล้ว

    sholdnt 30 also be in a leaf node?

  • @yashadattsawant2380
    @yashadattsawant2380 7 ปีที่แล้ว

    thanks for video

  • @ZachBugay
    @ZachBugay 7 ปีที่แล้ว

    After inserting 37, why is it also a parent node and a leaf node? This is in contrast to 13. It is a parent node, but it is not on a leaf node. Could someone please explain this to me please?

    • @qanda1702
      @qanda1702 5 ปีที่แล้ว

      When inserting 37, we needed to create a new node or sibling, which means the parent would need another pointer to point to it.
      To determine the new value in the parent, by convention, we take the min value of the right child, which happens to be 37.

  • @rubelahmed5458
    @rubelahmed5458 9 ปีที่แล้ว

    superb :)

  • @amartious2123
    @amartious2123 3 ปีที่แล้ว

    thanks

  • @TheUltimaxxxx
    @TheUltimaxxxx 6 ปีที่แล้ว

    Thanks.

  • @naweltr4030
    @naweltr4030 6 ปีที่แล้ว

    Thanks a lot

  • @vinhlehuu2976
    @vinhlehuu2976 3 ปีที่แล้ว

    if max key is odd , then how to divide ?

  • @tufailfbi
    @tufailfbi 10 ปีที่แล้ว

    Sir I have a confusion. How is its order 2 when it's having maximum child's 3

    • @douglasfisher7586
      @douglasfisher7586  10 ปีที่แล้ว

      Hi, Tufail -- a comment that I have under my "B+ Trees Basics 1" video (B+ Tree Basics 1) might be helpful, so I repeat it here. It may be the case that your textbook has used a differing convention from mine:
      "Regarding the order of a B+ tree ... I have seen definitions of B+ trees that state the ORDER of a B+ tree is the MINIMUM number of entries (and therefore, each node holds between the ORDER and 2 * ORDER entries) -- this is the way I defined B+ trees. But, I have also seen B+ trees defined so that the ORDER corresponded to the MAXIMUM number of entries (and so a node holds between 1/2 * ORDER and the ORDER entries). I think its easy to adapt to the inconsistency if aware of it."

  • @nikhilnagarapu3077
    @nikhilnagarapu3077 6 ปีที่แล้ว

    What is the order of the above tree?

  • @abhrajyotikirtania2275
    @abhrajyotikirtania2275 10 ปีที่แล้ว

    nice thanks..

  • @TimMrC
    @TimMrC 7 ปีที่แล้ว

    thanks dad

  • @chg_m
    @chg_m 7 ปีที่แล้ว

    ty bro

  • @adamali3832
    @adamali3832 6 ปีที่แล้ว

    great

  • @youssefmaksoud89
    @youssefmaksoud89 ปีที่แล้ว

    i love you

  • @tufailfbi
    @tufailfbi 10 ปีที่แล้ว +1

    Anybody please clear my confusion