Тёмный
Tony Saro
Tony Saro
Tony Saro
Подписаться
I make computer science & low level systems programming videos 👨‍💻.

#computerscience #programming
Writing My Own Database From Scratch
42:00
2 месяца назад
Комментарии
@miketag4499
@miketag4499 2 часа назад
I have two questions: 1. In case of underflow root, ehy the page numbers are not modified when the depth gets decreased by 1? In that case the child pages have a wrong page number 2. Are the indexes loaded into a btree upon initialization? Thanks
@markmagdy1525
@markmagdy1525 6 часов назад
no word describes what are you done ❤❤
@miketag4499
@miketag4499 16 часов назад
Fantastic video, I agree with others, so nice to see some real software engineering
@tech-nomade
@tech-nomade День назад
Please do a long premium course on Algorithms (preferably implemented in Rust, Go or C) on Udemy or similar platform. I bet it will sell like hotcakes. I somehow managed to avoid that topic over the last 10 years but now going to learn them in depths (within next months).
@tony_saro
@tony_saro День назад
Yeah it's a good idea, I will at some point, but I can't right now.
@tech-nomade
@tech-nomade День назад
Rust, Databases, Algorithms, Neovim & Linux - What do you need more in a video? :D
@tech-nomade
@tech-nomade День назад
Dude that's dope! Could you share with us how you build such good animations? Just After Effects / Davinci Fusion? Or any additional tools? How much time do you spend per minute of final video? I guess at least 1-2 hours per minute?
@tony_saro
@tony_saro День назад
Yeah it's about 1-2 hours per minute. I don't even use After Effects it's just Adobe Premiere with the "Essential Graphics".
@tech-nomade
@tech-nomade День назад
@@tony_saro Hey man, thanx for responding that quick! I have same Wallpaper as you @ 12:09 on the right Display! :D Did you learn this kind of video production with basic Premiere Pro tutorials or are there special kind courses? Can you suggest any to learn from? Or any payed / premium ressources? I want to create vids like yours / let's get rusty's /Dreams of Code's etc on Linux, FOSS, Vue, Golang and Rust as well, but can't find the right resource to get started. Anyhow, subscribed!
@tony_saro
@tony_saro День назад
I didn't use any courses at all, you can start with a basic Premiere tutorial on RU-vid and after that search for specific tutorials, "how to do X in Premiere". That's all I did, but keep in mind these are not my first videos, I have another RU-vid channel in Spanish which I started in 2019, so I have a lot of experience with editing.
@tech-nomade
@tech-nomade День назад
​@@tony_saro thanx man! yeah, probably just need to get started and then it comes from alone. Going to do a Davinci Resolve course next days on Udemy (canceled my Adobe CC long before I switched to Linux from Mac - even more evil to me than Apple, Google & Co, on the same level as Oracle). Looking forward to more vids on your projects here on RU-vid!
@GabrielxC
@GabrielxC День назад
Que paso con el español?
@tony_saro
@tony_saro 15 часов назад
instagram.com/s/aGlnaGxpZ2h0OjE3ODUxMDI2NDY1MjQ5NzA1?story_media_id=3399154947095379898_1492796422&igsh=bzl3MTJ4ZTNvNHd4
@joaopolonia9428
@joaopolonia9428 День назад
What a productive way to learn complex topics and also sharing it. You are a real software engineer!
@antropod
@antropod День назад
Kibybytes
@fernando6547
@fernando6547 2 дня назад
Hace poco lo implemente en java y fue bastante complicado,sin la recursión no podría hacerlo La insercion y eliminacion de un Árbol B fue realmente un reto
@qbqbqdbq
@qbqbqdbq 2 дня назад
The time honored tradition of reimplementing perfectly fine software in rust, but worse. Thanks dude.
@tony_saro
@tony_saro 2 дня назад
Gotta rewrite everything in Rust and make it blazingly slow 🤙
@mohannadqa5101
@mohannadqa5101 3 дня назад
Quality❤
@zxuiji
@zxuiji 4 дня назад
during pass 1 I woulda filled a file with the highest and lowest ID of each page and used that during phase 2 to sort the results only once since it's going to be a lot easier to sort the ID recorded in memory then it is to sort the file contents. Once the IDs are sorted by lowest ID 1st it's only a matter of looping through them to read the relevant pages. If a page noted by the ID list is missing an ID in a range it's only a matter of looking at the next page in the sorted ID list. If you're lucky the list of IDs will fit in memory, if it doesn't then you're just applying the original method you mentioned to the ID list.
@lawts78
@lawts78 4 дня назад
This is an outstanding piece of work. Absolutely incredible. Bravo! 👏
@LucasBatistussi
@LucasBatistussi 5 дней назад
Removal in BTree is a nightmare
@tony_saro
@tony_saro 5 дней назад
Just a bit hahaha. This is the worst part, took me a lot of time to realize: github.com/antoniosarosi/mkdb/blob/bf1341bc4da70971fc6c340f3a5e9c6bbc55da37/src/storage/btree.rs#L821
@c2vi_dev
@c2vi_dev 5 дней назад
12:16: that's the best way to learn!!!! and the second best way for viewers to learn. EDIT from the end of the video: about a year ago I wanted to understand, what databases do internally and annoyingly i found no good resources to understand that at all. (most places were like: if you are serious about it, read the sqlite source code, which i started, but that was too much for just a understanding of what are all the things involved, not all their implementation details). So this video is exactly what I was looking for back then and it's probably the best resource for getting started with database internals on the internet. (I searched A LOT and found nothing even close) PS: if you want to get even deeper into computing (down to hardware), there is no better resource than Ben Eaters 6502 Series + Sebastian Lague's "Exploring How Computers Work" both on RU-vid...
@jamiepaugh9700
@jamiepaugh9700 5 дней назад
Happy to sub because you built something interesting and explained it VERY well. Awesome video!
@sebastianalvarez3053
@sebastianalvarez3053 5 дней назад
No seguiste haciendo videos en español?
@tony_saro
@tony_saro 5 дней назад
No
@fblua
@fblua 5 дней назад
Great video Tony. !! Thank you for sharing your knowledge; thank you for your excellent job. !! My best wishes for your channel. Fernando, Buenos Aires, Argentina
@awabomer
@awabomer 5 дней назад
It's really amazing and very rare to see. The only thing i would recommend is focusing more on the code than theory and diagrams, slides, etc.
@tony_saro
@tony_saro 5 дней назад
That's exactly what I wouldn't recommend and the reason I'm making these videos. The code by itself is almost useless, when I built my database I copied some things from SQLite, I had the code right in front of me and yet understanding it took countless hours of running it, adding print statements, modifications, etc. But if I had had a visual explanation of what an algorithm does instead of just code, then it would've been much easier. As I said in the video, my codebase is 25K lines, it's not a basic Node.js TODO app where you can explain all the code in 1 hour, it's low level code mixed with complicated algorithms and many subsystems built from the ground up that interact with each other. It would take dozens if not hundreds of hours to "explain the code". So I just explain what's important, the "idea" behind the code, then if you want to read the code you can do it calmly on your computer. The least complicated part of programming is always the code.
@yigitgnc
@yigitgnc 6 дней назад
If I were working on such a complex project, I would smoke 2 packs of cigarettes a day
@tony_saro
@tony_saro 6 дней назад
😂😂😂 seems reasonable
@jassencastilloespinoza4780
@jassencastilloespinoza4780 6 дней назад
wait a second, why is this channel in english? I'm pretty sure it was in Spanish before.
@tony_saro
@tony_saro 6 дней назад
El español es otro. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-HLMPUrm376E.htmlsi=_Ks2Tu6qylnl91XG
@jassencastilloespinoza4780
@jassencastilloespinoza4780 6 дней назад
@@tony_saro vamoh a apoyar ambos canales! sos un capo!
@radouanegherab2189
@radouanegherab2189 6 дней назад
Okay same binary tree approach but switch the binary tree with self balanced binary tree ( i know b tress are the optimal solution i just want to know why wouldn't the self balanced tree work )
@tony_saro
@tony_saro 6 дней назад
Binary trees only store one key per node. B-Trees use fixed size pages (suitable for disk storage unlike binary trees) and can store many variable length keys.
@mohammadasif5798
@mohammadasif5798 7 дней назад
Me after a reversing a LL
@douglas_w24
@douglas_w24 7 дней назад
El canal en español murió? 😢
@tony_saro
@tony_saro 7 дней назад
Básicamente
@douglas_w24
@douglas_w24 7 дней назад
@@tony_saro por qué?😭
@lf6190
@lf6190 7 дней назад
"I decided to write my own database" ... lol how much red bull were you drinking that day? XD
@tony_saro
@tony_saro 7 дней назад
Yeah you don't wanna know
@Yarin5879
@Yarin5879 7 дней назад
pro reduced CS degree in a single video
@krzysztofkwiatkowski8087
@krzysztofkwiatkowski8087 7 дней назад
This is an awesome video! I can't wait for the next episodes of this series.
@kailashb.poudel
@kailashb.poudel 7 дней назад
Hello sir, I am also thinking of building a DBMS project for my final year project using a data-oriented design approach. Can you share me some of the resources you have accumulated? I am also doing research and am stuck in reading about data-oriented design and would be a great hekp if you would be kind enough to share some of the resources?
@tony_saro
@tony_saro 7 дней назад
I only used CMU Intro de Database Systems. ru-vid.com/group/PLSE8ODhjZXjbj8BMuIrRcacnQh20hmY9g&si=C2zF7i-5R_Gll0DC
@kailashb.poudel
@kailashb.poudel 6 дней назад
@@tony_saro Thank you sir
@asjvchnvh9313
@asjvchnvh9313 7 дней назад
Thank you for this series of videos, I am starting to build my database too, and by research found your videos. Was really useful!
@phv8753
@phv8753 8 дней назад
Who knows prof Saraj Sahni behind this Btree algo?
@LarryGarfieldCrell
@LarryGarfieldCrell 8 дней назад
What's your process for making the graphics? They're fantastic. What tools do you use?
@tony_saro
@tony_saro 8 дней назад
Adobe Premiere
@mirastyle
@mirastyle 8 дней назад
This is amazing. Glad I stumbled upon your channel in the sea of the same boring trivial tutorials. Looking forward to seeing more
@sorcdk2880
@sorcdk2880 8 дней назад
Just wait until you realise there are special optimized algorithms for when you are looking up more than one key at the same time. Those will make B-trees look like cute little things in comparison.
@tony_saro
@tony_saro 8 дней назад
I implemented some ranged queries, for statements like "primary_key BETWEEN X AND Y" or "primary_key > X". Other than that you can't do much else with B-Trees.
@sorcdk2880
@sorcdk2880 8 дней назад
I think I need to correct that I mean the kind of datastructures you use to optimize those searching. You typically end up with some variation of a k-d tree, which you then need to turn into a page optimized version. The optimized ones also have "fun" optimizations such as fractional cascading, which is somewhat of a nightmare.
@tony_saro
@tony_saro 8 дней назад
Oh I'm pretty sure there are data structures more complicated than this one. I'm just speaking from experience, I did not implement any of them. I wrote some complicated data structures for a memory allocator project, but not as complicated as disk B-Trees.
@Nico-lj6qs
@Nico-lj6qs 8 дней назад
Tus videos son buenísimos como explicas y las animaciones que utilizas hace que sea fácil de entender, yo estoy haciendo una app web con java para visualizar las operaciones en arboles B que indique todas las lecturas/escrituras. Complete la inserción y hacer la realocación de punteros cuando un nodo se divide y promociona a medida que el árbol crece fue bastante mas complicado de lo que pensaba, pero ni de cerca es tan recursivo y elegante como el que mostras acá 😅
@pauek
@pauek 8 дней назад
Great video! Great animations and visuals (is it manim?)! Great explanation! Great pace and rhythm. But the code font is too close to Comic Sans for me... 😅
@tony_saro
@tony_saro 8 дней назад
Not Manim, it's just standard Adobe Premiere. Code Font has many haters 😂
@LSS94
@LSS94 9 дней назад
This was awesome and super refreshing. Not a lot of quality mid level SWE content out there!! Thanks for your effort!
@JacoBluezz
@JacoBluezz 9 дней назад
Do you have video of you making the reverse http proxy? Also I love the idea of this series, looking forward to seeing you breakdown and recreate the tools we use every day
@tony_saro
@tony_saro 9 дней назад
I do but it's in Spanish, on my old channel. I don't have English subtitles yet. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-HLMPUrm376E.htmlsi=NNeZIRZeegXfc-6T
@ahmettek315
@ahmettek315 9 дней назад
So you mean to throw postgreSQL and MySQL to trash???? Why the need to click bait.
@lethern2
@lethern2 10 дней назад
My respect for your discipline and motivation, and speaking of that, please share your secret to having that 7 months motivation. (Since its easy to have ideas, but its hard to put effort and work into them)
@tony_saro
@tony_saro 10 дней назад
I don't think I have a secret, it's simply that I wanted to upload this video because I was certain it was going to work well and I just became obsessed with this project till I finished it.
@lethern2
@lethern2 10 дней назад
@@tony_saro Intriguing What I'm curious about is what was the main motivation here (since a lots was needed), maybe a positive one like wanting to educate others, or less positive one (like trying to be famous and liked), or just trying to learn how those black boxes work. But I can believe that it was the experience with other projects and other videos
@tony_saro
@tony_saro 10 дней назад
It's a combination of everything you mentioned. - Trying to educate others: If I had a video like this when building my database it would not have taken 7 months, I would've done it much faster. So whoever wants to build a database out of curiosity now has this resource available. - Becoming famous: Not necessarily a bad thing, the more people watch these videos the more motivation I have to make more of them and make them as high quality as possible. - Trying to learn how those black boxes work: This is one of the main motivations, I'm very curious and as I said at the beginning of the video, reinventing the wheel or reverse engineering existing projects is a very good way of learning.
@lethern2
@lethern2 9 дней назад
@@tony_saro Thats nice, I wish I could join on such a project, since I noticed lack of social connection is my biggest procrastination, but sadly I'm not familiar with rust :D But I'll wish you good luck
@mcodesthings
@mcodesthings 10 дней назад
Fantastic example and great use of the maximum "just because I can doesn't mean I should". Can't wait to show this to all my buddies for a solid laugh
@tony_saro
@tony_saro 10 дней назад
Exactly, just because you can it doesn't mean you should 😂
@BritishBeachcomber
@BritishBeachcomber 10 дней назад
Other guys write databases so you don't need to.
@smajdovamanka
@smajdovamanka 10 дней назад
We must protect this man at all costs
@tony_saro
@tony_saro 10 дней назад
🫡
@jasonpieterse2534
@jasonpieterse2534 10 дней назад
Thank you for sacrificing half a year of your life my guy. I've always been interested in how these things are implemented and I'm glad to see I was right about some things but I learned a lot and will definitely be reading through that repo.
@corsaro0071
@corsaro0071 11 дней назад
Thanks for the great content
@tony_saro
@tony_saro 10 дней назад
Thank you for the super
@J0s3p029
@J0s3p029 12 дней назад
Llevo un año sin saber que te habías pasado a la comunidad inglesa XD
@tony_saro
@tony_saro 12 дней назад
Me he pasado hace 1 mes
@deezydoezeet
@deezydoezeet 12 дней назад
It writes itself😂🤣 *I* for one haven't really written a serious parser before
@Mullekular
@Mullekular 12 дней назад
legendary...
@mayfly0
@mayfly0 13 дней назад
amazing video 👍👍👍
@Darkstar2342
@Darkstar2342 13 дней назад
We had to write our own SQL (-like) database at university. It was fun. But writing the query optimizer killed me. But since then I can appreciate how much work goes into a database ;-)
@tony_saro
@tony_saro 13 дней назад
Same, I didn't talk much about the query optimizer but it was a pain. Finding which indexes to use from all the possibilities is really hard. I copied some stuff from Postgres and made my own recursive algorithm based on that.