Create Your Own Database from the Ground Up - Part 1 - Balanced Binary Trees

  Рет қаралды 12,022

Gary Explains

Gary Explains

Күн бұрын

Пікірлер: 37
@HanCurunyr
@HanCurunyr Жыл бұрын
As a DBA with 10 years of experience, that was the most friendly explanation of inner workings of a non clustered index that I ever saw, great work Gary, I'll link this video to every newbie that needs to understand indexes
@endoflevelboss
@endoflevelboss Жыл бұрын
As a DBA with 10 years experience? So quite a noob really on the professional ladder...
@HanCurunyr
@HanCurunyr Жыл бұрын
@@endoflevelboss boohoo
@endoflevelboss
@endoflevelboss Жыл бұрын
​@@HanCurunyrmakes zero sense. That will be the 10 years inexperience talking...
@rodrodrigues1729
@rodrodrigues1729 6 ай бұрын
@@endoflevelboss true... I have 20 years in the field and I'm pretty sure I know nothing.
@thepresi2
@thepresi2 Жыл бұрын
what a serendipitous post! I'm working on a database project written in C and I was wondering what an ideal course of action would be. Thanks Gary!
@lavisharma3210
@lavisharma3210 Жыл бұрын
Thank you so much Gary, this is exactly what I was searching for, I am planning to work on a side project for myself, creating a database in golang and have been researching about databases and their internal workings and parts (mysql to be specific). This series came at the right time for me. Thanks again !
@GaryExplains
@GaryExplains Жыл бұрын
Glad it was helpful!
@johng7rwf419
@johng7rwf419 Жыл бұрын
Thanks Gary, very interesting. Takes me back to the 80's where I was writing databases and optimization routines for surface mount placement machines. J
@danielgospodinow
@danielgospodinow Жыл бұрын
Great material! Thanks a lot, Gary!
@willthecat3861
@willthecat3861 Жыл бұрын
Interested in this for cataloging all equipment in different buildings, and locations... for finding it when they need it.
@noodlish
@noodlish Жыл бұрын
Really cool. Did you consider using a skip list instead? I find those fascinating due to their random nature.
@GaryExplains
@GaryExplains Жыл бұрын
I didn't consider that specifically, however I agree that there are lots of ways to do this.
@m8hackr60
@m8hackr60 Жыл бұрын
Hi Gary, I find this very cool and I might have to run some performance test on this one day. :) But really fantastic work. This level of proficiency typically takes a well organized and dedicated team. This coming from a DB Engineer of 18 years (in IT for 25) for a SaaS company working with Redis, Cassandra, PostgreSQL, MSSQL, and Oracle... among the top.
@GaryExplains
@GaryExplains Жыл бұрын
Very kind of you, thanks.
@jaydeep-p
@jaydeep-p Жыл бұрын
I love the video, while watching it I was thinking where a trie would fit into this. It would work just as well for search and insert operations right?
@GaryExplains
@GaryExplains Жыл бұрын
Interesting idea. I have never implemented a trie, but according to my quick bit of research the search time for a trie is O(n) compared to O(log n) for an AVL tree. But I could be wrong!
@jaydeep-p
@jaydeep-p Жыл бұрын
@@GaryExplains It would be O(m) where m is the length of the longest key.
@akiratoriyama1320
@akiratoriyama1320 Жыл бұрын
Super interesting!!!!
@joeedh
@joeedh 10 ай бұрын
I've always wondered why people dont use btrees (block trees) for in memory stores. DRAM is still pretty slow, dunno why everyone assumes the optimal child number is 2.
@MichaelSkinner-e9j
@MichaelSkinner-e9j Жыл бұрын
I need to get cracking on Nvidia‘s courses (Thankfully they come included on the Tegra boards) but I keep wondering how much of a database (SD Card size) would be needed on flight pathing and controls, While also allowing a user interface that’s seamless and easy
@muddyexport5639
@muddyexport5639 Жыл бұрын
Good job & thanks!
@GaryExplains
@GaryExplains Жыл бұрын
Thank you too!
@tonysheerness2427
@tonysheerness2427 Жыл бұрын
I understand the balance part but it puts it out of Alphabetical order, how does it manage it?
@HanCurunyr
@HanCurunyr Жыл бұрын
This is how a non clustered index works in SQL Server, it sorts the data, in case of strings, by alphabetical orders, checks for the middle element, sets it as a root and starts balancing the tree from there, as time passes, new data is inserted, deleted or updated, the tree becomes unbalanced, or fragmented as the SQL Server calls is, if the unbalance factor is less tan 30%, its possible to just reorganize the leafs, but if its more that 30%, we usually rebuild the index, as we delete the entire tree and start from scrath again
@QuikRay
@QuikRay Жыл бұрын
You create data bases with windows Access or Libre Office
@Maruman_man
@Maruman_man Жыл бұрын
This is at the machine level. You are describing application/end user apps
@MaximoJoshua
@MaximoJoshua Жыл бұрын
That JSON in the beginning is going to be invalid because the last quote is a "curly" quote, and doesn't match the opening one which is a straight quote...the word price is quoted like this "price“. Really distracting was all lol.
@GaryExplains
@GaryExplains Жыл бұрын
🤦‍♂️
@MaximoJoshua
@MaximoJoshua Жыл бұрын
@@GaryExplains Great video though, enjoyed it a lot.
@aizensosuke4660
@aizensosuke4660 Жыл бұрын
Number 1😂😂😂
@igaviotis
@igaviotis 11 ай бұрын
Sorry Gary, but what you describe is NOT a database, it is the implementation of the abstract data type called dictionary. A database cannot assume that all data resides in memory (that's a data structure like the balanced tree you implemented). Just saving and loading data in storage is barely sufficient for a db. I would argue that a dbms not offering schema creation is hardly a db anyways..
@GaryExplains
@GaryExplains 11 ай бұрын
Fair enough, your criteria are different to mine. I respect that. I guess you also don't like any of the nosql type databases or key-value stores.
@mintoo2cool
@mintoo2cool 3 ай бұрын
why is everyone all of a sudden trying to create databases ‘from ground up’ ?
@GaryExplains
@GaryExplains 3 ай бұрын
All of a sudden? Has there been a mad rush to create databases? I must have missed that 😜 These videos (in fact most of my videos) are about teaching things, explaining things, it is even in the name of the channel. Discovering how to create a database from scratch is called learning.
@mintoo2cool
@mintoo2cool 3 ай бұрын
@@GaryExplains Don't get me wrong. I appreciate your videos .. I blame the youtube algorithm more than you for inundating my feed with a bunch of these ... I guess I should have shut up and clicked off the video instead of getting short in the comment section ... because it's not something I wanted to watch ... feel free to remove this comment thread if it takes away from the video. Nevertheless, I appreciate your videos in general. Thanks for all your hardwork in educating us folks.
@wandiletembe
@wandiletembe Жыл бұрын
👨🏿‍💻🍿🇿🇦
Run your own AI (but private)
22:13
NetworkChuck
Рет қаралды 1,7 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
15 futuristic databases you’ve never heard of
8:42
Fireship
Рет қаралды 701 М.
Write a database from scratch | Episode 6, Index Storage Manager
19:15
98% Cloud Cost Saved By Writing Our Own Database
21:45
ThePrimeTime
Рет қаралды 397 М.
Writing My Own Database From Scratch
42:00
Tony Saro
Рет қаралды 262 М.
We made a REAL HOLOGRAM Desk like Tony Stark's!
23:57
Hacksmith Industries
Рет қаралды 8 МЛН
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 160 М.
The purest coding style, where bugs are near impossible
10:25
Coderized
Рет қаралды 1 МЛН
Writing My Own Text Editor | Prime Reacts
16:10
ThePrimeTime
Рет қаралды 100 М.
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.