Simplest, Most Detailed Explanation of BTrees | Why do Databases use BTrees not BSTs or Arrays?

  Рет қаралды 20,116

Keerti Purswani

Keerti Purswani

Күн бұрын

Пікірлер: 103
@koustubhshidlyale7545
@koustubhshidlyale7545 4 ай бұрын
loved the way you implemented data structure in real-world application. This helps us to understand how different data structure works rather than just solving leetcode problems.
@KingKing-jy4kk
@KingKing-jy4kk 3 ай бұрын
Hey i think it will be good to mention that in the time, mainly searching time of block in whole disk is considered. It looks like initially we are considering just block access/read time then later on we optimising search time. It can lead a confusion that all index tables ultimately pointing to 10^5 blocks only which also have to be read at the end, so its still 100 seconds to read via the index table as well.
@initiator0016
@initiator0016 4 ай бұрын
The depth with which things are explained really makes a difference. Keep up the great work.
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Thank you so much! 😇
@vinayakporwal9885
@vinayakporwal9885 4 ай бұрын
Easy math for storing disk calculation: - Each pile of disks can store 10 records and takes 4KB of storage. - To store 1 million records, you need 100,000 piles. Traversing each pile takes 1ms, so total time is 100 seconds (100,000ms). Optimizing with Index Table: - Each index table row takes 10 bytes to store one pile's address. - 1 pile (4KB) can store 400 rows (addresses). So, 1 index pile can store addresses for 4,000 records. Result: - To store 1 million records, you need 250 index piles additionally to make it optimize. Access time is now 250ms to 251ms (250ms to find the right index pile, 1ms to access the record). Further Optimization with another Index table: - We know each row takes 10 bytes to store one pile's address. - We have 250 piles of index table-1 that we are storing each pile in each row of Index table-2 which takes 250 rows (10 bytes each) = 2500 bytes < 4000bytes(one pile) Result: -- To store 250 index piles, you need one multi-index pile additionally to make it more optimize. - Access time is now 3ms = 1ms (for getting multi index pile) + 1ms(for getting index pile) + 1ms (for getting 10 records pile) correct me if some error
@aishwaryas8283
@aishwaryas8283 4 ай бұрын
Thanks for this summarisation 👍🏼
@DeepankarManduri123
@DeepankarManduri123 4 ай бұрын
Hi Keerti, I am having 10 yr of experience in IT industry but the way you have given the internal overview of DB and given the DSA with practical approach, it has given me a revision of DSA and kudos to you, I am a big fan of your hard work and would like to understand DSA more from you . Thank you so much for such a mentorship
@shlokbansod545
@shlokbansod545 3 ай бұрын
guysss if you are wondering whether you should watch the whole video or not. Let me tell you this is the best video for understanding b-trees. I have watched every video on youtube but hands down this is the best video so far. You are the best teacher ever keerti mam
@hpandeymail
@hpandeymail 14 күн бұрын
You are an exceptional teacher. Getting concepts driven in such a structured flow. 🙏
@StellasAdi18
@StellasAdi18 4 ай бұрын
This is amazing. Sometimes when you work in a company for 5+ years, at times tend to forget basics. Thanks for covering this topic and looking forward to more. You are one of the best teacher/mentor.
@blogspotinfitec
@blogspotinfitec 4 ай бұрын
I really appreciate your hard work toward teaching in KZbin channel , SALUTE.
@Hemanthkumar-ck1zu
@Hemanthkumar-ck1zu 4 ай бұрын
I have just found your KZbin channel. This is amazing. I mean this is pure gold!!, I don't know why KZbin didn't recommend you till now or why you don't have a million views.
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
I also don’t know why 🥲
@Md_sadiq_Md
@Md_sadiq_Md 4 ай бұрын
The point mam showed me B-Tree I have just blown up Thank you for making me love with Engineering
@VaibhavPatil-rx7pc
@VaibhavPatil-rx7pc 2 ай бұрын
clear, crisp explanation, top of top
@DattaprasadChavan
@DattaprasadChavan 4 ай бұрын
Excellent explanation. I fell in love with learning how DBs work behind the scenes. Thank you so much for such great content.
@arvishdoshi6209
@arvishdoshi6209 3 ай бұрын
Such a nice explanation of things and how it all works under the hood. I wonder why this channel hasn’t received a million subs yet ❤ .. surely deserves so much appreciation
@Hemanthkumar-ck1zu
@Hemanthkumar-ck1zu 4 ай бұрын
I might get addicted to your explanations
@Md_sadiq_Md
@Md_sadiq_Md 4 ай бұрын
A video on B+ Trees please 🥺
@div0007
@div0007 4 ай бұрын
Hey Keerti, I read about B-trees from the book Designing Data-Intensive Applications, but your clear explanation really helped me understand it better. Thanks for making this video!
@raviyadav2552
@raviyadav2552 3 ай бұрын
It is super intuitive. Thank you so much for sharing it :)
@sagarsunar6501
@sagarsunar6501 3 ай бұрын
Really awesome content. Keep inspiring and aspiring! !
@manideep7148
@manideep7148 3 ай бұрын
u r the most underrated youtuber. you pace, ur way of explanation is amazing. btw I love the way u say "hey guys"😅
@rohitsai806
@rohitsai806 4 ай бұрын
Hats off to your dedication 🎉..Great video about the internal working of indexing and really good comparison about the time taken using multiple data structures.
@shortflicks83
@shortflicks83 4 ай бұрын
I love the way you are explaining each and everything. More power to you keerti from Pakistan
@amitaggrawal5069
@amitaggrawal5069 4 ай бұрын
Hello Keerti, Thanks for this amazing video. Your hard work is visible since you are going to such depths and helping to build the foundation on the topic. Looking forward for more such videos.
@abhishekvishwakarma9045
@abhishekvishwakarma9045 4 ай бұрын
awesome content this series is going to be amazing 🔥
@titanofchaos
@titanofchaos 4 ай бұрын
YOUR WAY OF TEACHING ❤
@sragopal
@sragopal 4 ай бұрын
Thank you Ma'am this series will be a great hit for you :)
@shru8178
@shru8178 2 ай бұрын
Amazing in-depth content! Thanks a lot :)
@aumprakashdehury
@aumprakashdehury 4 ай бұрын
Hi Keerti, Please do separate video on B-Tree and B+-Tree.
@yogeshsy7382
@yogeshsy7382 4 ай бұрын
A Big thank you! Can't wait for the next video on SQLite.
@nakulmantri1235
@nakulmantri1235 4 ай бұрын
Beautiful explanation, loved the way you related indexing and rotated it to make btree
@ankushladani496
@ankushladani496 4 ай бұрын
Thanks for this level of content...❤😊🎉
@Praveshkumar-by3tq
@Praveshkumar-by3tq 4 ай бұрын
there should be a dry run of how the b-tree is formed, how it split and make one more level of indexing.
@chargeduprochit2615
@chargeduprochit2615 4 ай бұрын
it was an amazing video mam please continue this series ,its really helpful and intriguing
@Mahmmadhusen072
@Mahmmadhusen072 4 ай бұрын
Exillent as usual 😊
@TechSpot56
@TechSpot56 4 ай бұрын
Great explaination, keerti. repeating the concept briefly after in-depth explaination really helps. ☺
@paramgoswami7224
@paramgoswami7224 4 ай бұрын
please do go into more detail .. maybe a seperate video about B+ tree
@hemanthaugust7217
@hemanthaugust7217 25 күн бұрын
fantastic video !!
@PariRams
@PariRams 4 ай бұрын
I enjoyed the video!✨ I have a couple of questions though about indexing and how it works with different data types. 1.When indexing an integer primary key, I understand how the B-tree or B+ tree efficiently organizes and searches through numbers. But how does this process change when the index is a string? How are the addresses and values stored in this case? 2.Additionally, could you explain how a multilevel (composite) index works, especially with a B-tree? For example, if we index on two columns (say, a string and an integer), how does the B-tree structure handle this, and how does it affect search performance?"
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Noted, let me cover in upcoming videos!
@singhji4149
@singhji4149 4 ай бұрын
Keerti courses are really awesome 🙌....
@AmitKumar-xc2rk
@AmitKumar-xc2rk 4 ай бұрын
Great explanation, can't wait for the next video. Please drop it asap
@abhidevlops
@abhidevlops 4 ай бұрын
Kirti mam great video need more videos like this 😍
@x_x3557
@x_x3557 4 ай бұрын
At 31:41, what range is pointed by each key? Does100 point to values =100, if yes then why are m-1 keys required ?
@AnandTiwariJDE
@AnandTiwariJDE 4 ай бұрын
Amazing content. Experience can be more better with less Ad interruptions. Too many Ads interfere with learning!
@blogspotinfitec
@blogspotinfitec 4 ай бұрын
Please provide more detailing
@vaibhavyadav1787
@vaibhavyadav1787 4 ай бұрын
It would be great if you could tell how same thing work with SSD also. It's really appreciated what're you doing miss, hats off to you ;)
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Will do! ✌🏻✌🏻
@kapilyadav5101
@kapilyadav5101 4 ай бұрын
Great in-depth explanation
@abushivivek4601
@abushivivek4601 4 ай бұрын
Eagerly waiting for next one 💃
@abhiram_ar
@abhiram_ar 4 ай бұрын
love your teaching 🌻🌻
@KD-mg1lv
@KD-mg1lv 4 ай бұрын
Excellent Ma'am👍🤌
@wellwisher7333
@wellwisher7333 4 ай бұрын
Thanks Keerthi.
@binary-brackets
@binary-brackets 4 ай бұрын
Thank you @Keerti, Wonderful explanation!!
@kaustavdas6550
@kaustavdas6550 Ай бұрын
I understand that our height comes to 3 with a order of 100 or m = 100 and and n or total no.of nodes = 10^6. So if m is the no.of keys eache node should what is the physical representation of 100? Is it 100 records or 100 entries?
@ronn004
@ronn004 2 ай бұрын
really awesome
@sheruloves9190
@sheruloves9190 4 ай бұрын
Wonderful!
@chiraglosalka6893
@chiraglosalka6893 13 күн бұрын
let's say HD has a total of 10^8 blocks, how does it know it has to go to only those 10^5 blocks? Wouldn't it search for entire set of blocks? Correct me if I am wrong.
@vivekmishra5876
@vivekmishra5876 4 ай бұрын
Awesome 😮
@gethighfly
@gethighfly 4 ай бұрын
Hi Keerti, hope you are doing well. I have 2 questions: 1. Do your design courses really only require basic JS knowledge? Do you explain all the frameworks and libraries used when coding? How comfortable would one be following along? 2. Do you have any courses on distributed systems or do you intend on doing anything related to them?
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Hey, Pre-requisites are always mentioned in the course description (check FAQ) LLD and HLD are interview prep focused courses vs HHLD focuses on project building which could be either for a better resume or to become better engineer. HHLD focuses on distributed systems. Please checkout curriculum and FAQ and if you have any further questions, mail us at support@educosys.com
@pranaykanjolia9077
@pranaykanjolia9077 4 ай бұрын
Heyy Keerti, u said 100 sec to ready 10^5 blocks in the first approach, in second by using index table, we are reading 250 block as entries addresses are over there, but those are also ultimately pointing to 10^5 blocks only which also have to be read at the end, so its still 100 seconds to ready via the index table as well. Kindly explain, what point u are trying to make over there?
@riteshkumar433
@riteshkumar433 4 ай бұрын
@@pranaykanjolia9077The second approach is when you are trying to find a row in the table by some value of a column that is indexed. In that case you will only need to iterate the whole index table at max and will be able to find that item. In the first case you will have to iterate the whole table.
@riteshkumar433
@riteshkumar433 4 ай бұрын
But in this case you could also optimize by using binary search on index table as we are already assuming the table is sorted.
@adityavijaysomani2546
@adityavijaysomani2546 3 ай бұрын
Can you explain here in comment --- m key in layer one , which contains mapping of other tables like that key can have m + 1 Child. Each child can suppose have 100 values (0-100 , 100-200 and so on ). If this child consider as parent for his child ( it should technically have 100 keys ) and his child can have 101 children. I am not undestanding m keys parent can have m * m keys as total keys of child. ( time in video 33:40) . Maybe I am thinking something.Can you give little more clarity ?
@jaygoyani5934
@jaygoyani5934 4 ай бұрын
thank you didi💞
@TheBigOlTime
@TheBigOlTime 4 ай бұрын
please do create a indepth explaination on B+ trees also...🙂🙂
@pishkekarsanthosh234
@pishkekarsanthosh234 3 ай бұрын
level sabke niklenge after completed this playlist
@srinathsagar4736
@srinathsagar4736 4 ай бұрын
Could you please share the resources you used in your research that could be useful to us?
@debangshubanerjee1311
@debangshubanerjee1311 3 ай бұрын
every node(except root) should have minimum ceil(m/2) chldren and ceil(m/2)-1 keys. In the vdo it is mentioned wrong as min keys=ceil(m/2)
@tripatjotsingh1623
@tripatjotsingh1623 4 ай бұрын
Great video and learning. Got a question that Mongodb's document has maximum size of 16 kb. Is it because of block size?
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Thanks and nope. We will cover this!
@akj3344
@akj3344 4 ай бұрын
Your proposal video sent me here lol. Love this content1
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Hehe! Both great videos 🫢🫢
@akj3344
@akj3344 4 ай бұрын
Indeed they are!
@mithunrahman8978
@mithunrahman8978 4 ай бұрын
very nice mam, Plz make a video on B+ tree
@mehdismaeili3743
@mehdismaeili3743 4 ай бұрын
Excellent .
@arshdeepkumar
@arshdeepkumar 4 ай бұрын
i hope i would have known the amazing concepts of databases in my college then would have focused more on OS and Networking Great Content is there any book i can read on OS ?
@Ashutosh_ojha.
@Ashutosh_ojha. 4 ай бұрын
Yes there is this famous book for the operating system just search: principles of operating system by galvin
@singhji4149
@singhji4149 4 ай бұрын
One more question that keerti will you covering sharding also ?
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Ofcourse! That is such an important part of databases
@prashantkumar2963
@prashantkumar2963 4 ай бұрын
Geth uses trie to store data.
@accidentalSoftwareEngineer
@accidentalSoftwareEngineer 4 ай бұрын
Why ram is fast and expensive
@rabindrapatra7151
@rabindrapatra7151 4 ай бұрын
I am working since 8 years, yet not reached to depth. Surely 40 minutes wont give me in-depth I feel.
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
If you always keep thinking like this, how will you ever reach the depth? It’s one step at a time. You have to get started somewhere and this is an entire series. I don’t get your reasoning 🤷🏻‍♀️
@rabindrapatra7151
@rabindrapatra7151 4 ай бұрын
@@KeertiPurswani I was looking for more longer and detailed content with some code using b trees, b+ trees
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
@rabindrapatra7151 we will be going through the code of actual databases and debugging it and this isn’t the last video 😇
@manideep7148
@manideep7148 3 ай бұрын
@@KeertiPurswaniu r the most underrated youtuber. you pace, ur way of explanation is amazing. btw I love the way u say "hey guys"😅
@deadpoolx1477
@deadpoolx1477 4 ай бұрын
Madam your looking like Niharika Konidala
@Bhairav-r4x
@Bhairav-r4x 3 ай бұрын
That's fine but how to make my brain to work faster that is my first problem, can we implement indexing for same😂😂😢
@a2zfun181
@a2zfun181 4 ай бұрын
Ye to mera gate ja syllabus h.. 😂😂😂sector, disk, flatter, read n write seek time...
@amogu_07
@amogu_07 4 ай бұрын
Letsgooo
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
✌🏻✌🏻
@niteshshah4306
@niteshshah4306 4 ай бұрын
Level sabke niklege was like:- 🤣🤣...
@Praveen-i9o
@Praveen-i9o 4 ай бұрын
I hope you understand that much at least - that’s Arrogance
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
What’s arrogance? 👀 Teaching well?
@DarkKnight-o8w
@DarkKnight-o8w 4 ай бұрын
Dell intel all are laying offs, market down and these bhaiyya didis saying market is good, course le lo job lag jayegi 😂
@KeertiPurswani
@KeertiPurswani 4 ай бұрын
Tutorial video pe bhi hatred failaake funny aur cool lagna chaah rahe ho? Khud ki bejjati kr rhe beta
@prashantkumar2963
@prashantkumar2963 4 ай бұрын
I am myself reading Go Ethereum.A client of ethereum.
@selfmotivatedperon007
@selfmotivatedperon007 4 ай бұрын
More respect for such content contributer 🫴🫴
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
Why do databases store data in B+ trees?
29:43
Arpit Bhayani
Рет қаралды 46 М.
YouTube High Level System Design with @harkirat1 !!
35:02
Keerti Purswani
Рет қаралды 110 М.
How do indexes make databases read faster?
23:25
Arpit Bhayani
Рет қаралды 77 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Building Real-time Apps with Go | Azim Pulat
54:58
Azim Pulat
Рет қаралды 66 М.
Systems Design in an Hour
1:11:00
Jordan has no life
Рет қаралды 34 М.
Event-Driven Architecture (EDA) vs Request/Response (RR)
12:00
Confluent
Рет қаралды 178 М.
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.