B-tree vs B+ tree in Database Systems

The Backend Engineering Show with Hussein Nasser

Episode | Podcast

Date: Sun, 27 Jun 2021 19:06:11 GMT

<p><br /></p> <p>In this episode of the backend engineering show I'll discuss the difference between b-tree and b+tree why they were invented, what problems do they solve, and the advantages and disadvantages of both. I'll also discuss the limitation of implementing b-tree over b+tree and how Discord ran into a memory limitation using b-tree Mongo.</p> <p><br /></p> <p><img alt="db3" height="48" src="https://yt3.ggpht.com/adkarnG3YxVHrhHPVYNxjNLCVyudq9gim7rpBguGYERy-zK0vac4X7EPTwDhzDRDPsshdGFCfg=w48-h48-c-k-nd" width="48" /> Check out my udemy Introduction to Database Engineering course <img alt="db3" height="48" src="https://yt3.ggpht.com/adkarnG3YxVHrhHPVYNxjNLCVyudq9gim7rpBguGYERy-zK0vac4X7EPTwDhzDRDPsshdGFCfg=w48-h48-c-k-nd" width="48" />https://husseinnasser.com/courses &nbsp;&nbsp;&nbsp;Learn the fundamentals of database systems to understand and build performant backend apps</p> <p><br /></p> <p>0:00 Data structure and algorithms</p> <p>1:30 Working with large datasets</p> <p>6:00 Binary Tree</p> <p>8:30 B-tree</p> <p>19:30 B+ tree</p> <p>22:00 B-tree vs B+ tree benefits</p> <p>25:00 MongoDB Btree Indexes Trouble</p> <p>30:00 Summary</p> <p>working with a billion row table (Members only)</p> <p><a href="https://youtu.be/wj7KEMEkMUE">https://youtu.be/wj7KEMEkMUE</a></p> <p>indexing video</p> <p><a href="https://youtu.be/-qNSXK7s7_w">https://youtu.be/-qNSXK7s7_w</a></p> <p>Discord moving from MongoDB to Cassandra</p> <p><a href="https://www.youtube.com/watch?v=86olupkuLlU">https://www.youtube.com/watch?v=86olupkuLlU</a></p> <p><a href="https://blog.discord.com/how-discord-stores-billions-of-messages-7fa6ec7ee4c7">https://blog.discord.com/how-discord-stores-billions-of-messages-7fa6ec7ee4c7</a></p> <p>MongoDB Indexes</p> <p><a href="https://docs.mongodb.com/manual/indexes/">https://docs.mongodb.com/manual/indexes/</a></p> <p>Postgres Indexes</p> <p><a href="https://www.postgresql.org/docs/13/btree-implementation.html">https://www.postgresql.org/docs/13/btree-implementation.html</a></p> <p>btree code</p> <p><a href="https://www.cs.usfca.edu/~galles/visualization/BPlusTree.html">https://www.cs.usfca.edu/~galles/visualization/BPlusTree.html</a></p> <p><a href="https://www.cs.usfca.edu/~galles/visualization/BTree.html">https://www.cs.usfca.edu/~galles/visualization/BTree.html</a></p> <p><br /></p> <p><br /></p> <p>Support my work on PayPal https://bit.ly/33ENps4&nbsp;</p> <p>&nbsp;Become a Member on YouTube</p> <p>&nbsp;https://www.youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join 🧑‍🏫&nbsp;</p> <p>Courses I Teach https://husseinnasser.com/courses</p> <p><br /></p>