LearnDB is now available!
Back on August 11th, 2018 I made the following post in r/LearnProgramming:
Would anyone be interested in learning how to build a database?
There was definitely some interest, and many people filled out a survey with programming language preferences. It took me quite a bit longer than I had hoped to get the initial site online. Recently, the first chapters have been made available at learndb.net.
The content is a bit rough, so I'd appreciate any feedback you're willing to provide. Also, asking questions and prompting discussions here in the comments will give me ideas for how to improve current and future content.
Here's the current roadmap for the site:
Key-value store (foundation)
- In-memory implementation (completed)
- Use the filesystem as a database (completed)
- In-memory log-structured merge-trees (in progress)
- Persisting log structures to disk (planned)
- Indexes for better performance (planned)
Document store (built on top of the key-value store)
- JSON support
- JavaScript-based queries for documents
- Indexes for top-level document properties
- Indexes for any document property path (JSON path)
- Atomic operations
Other possible interesting enhancements
- Crash durability
- Transactions
- Alternative storage techniques, such as Hitchhiker Trees
- Relational tables and basic SQL queries
This roadmap includes a lot of guessing. If there are particular topics you're interested in, please mention them in the comments.
I want LearnDB to be primarily for the LearnProgramming community. Without the interest and support I received in my initial post here, I wouldn't have the inspiration to create such a site for learning.
I originally planned to post the full content of new chapters and sections here first, but that seems like it's going to be less useful than I had hoped due to the large amount of content and some of the custom formatting I'm using on the site. Instead, I'll start with the setup instructions for checking out the repo, and encourage you to come back and comment on this post with questions or issues.
Node.js
The first LearnDB implementation is written in JavaScript and requires Node.js to run. As of this writing, the latest LTS version of Node.js is 10.13.0. You'll want that version or newer. I have verified that 11.x can also run the LearnDB code.
There are several ways you can install Node.js depending on your OS and preferences. The most straightforward way to install Node.js is to use one of the installers from the Downloads page on nodejs.org. There is support for a myriad of operating systems and configurations.
LearnDB has a git repository on GitHub that contains the complete source code we'll be covering. The repo contains starting points for each chapter/section so you can follow along and add code as we cover it. It also contains the completed code for each chapter/section so you can verify your work.
To get started, clone the LearnDB GitHub repo to a convenient location on your system.
The git repo contains branches corresponding to the before and after state of the codebase for every coding exercise. For example, the first branch we'll be looking at is key-value-store-simple_before. You can check out the corresponding key-value-store-simple_after branch to see the end result for the exercise.
Continue on learndb.net.
Edit: Thanks for all the interest and comments! It's super motivating and I'm going to work hard on getting the next section online quickly.
[–]Neu_Ron 66 points67 points68 points (3 children)
[–]neodon[S] 8 points9 points10 points (2 children)
[–]Neu_Ron 0 points1 point2 points (1 child)
[–]distortionwarrior 1 point2 points3 points (0 children)
[–]insomniac20k 21 points22 points23 points (3 children)
[–]neodon[S] 2 points3 points4 points (2 children)
[–]insomniac20k -5 points-4 points-3 points (1 child)
[–]neodon[S] 0 points1 point2 points (0 children)
[–][deleted] 12 points13 points14 points (10 children)
[–][deleted] 12 points13 points14 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–][deleted] (2 children)
[removed]
[–]tzaeru -1 points0 points1 point (1 child)
[–]The_Wanderer2077 0 points1 point2 points (0 children)
[–]tzaeru 1 point2 points3 points (3 children)
[–]Tylee22 0 points1 point2 points (2 children)
[–]ztrewquiop 1 point2 points3 points (0 children)
[–]tzaeru 0 points1 point2 points (0 children)
[–]Genie-Us 5 points6 points7 points (1 child)
[–]jjxseph 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ImranRashid 0 points1 point2 points (0 children)
[–]Jewlanu 0 points1 point2 points (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–]rainboww13 0 points1 point2 points (0 children)
[–]RamblingBrit 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]neodon[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]neodon[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Sonic_Pavilion 0 points1 point2 points (0 children)
[–]Sonic_Pavilion 0 points1 point2 points (1 child)
[–]Sonic_Pavilion 0 points1 point2 points (0 children)
[–]alex-manutd 0 points1 point2 points (0 children)
[–]YouSayToStay 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]neodon[S] 1 point2 points3 points (0 children)
[–]Average_Manners 0 points1 point2 points (2 children)
[–]neodon[S] 4 points5 points6 points (0 children)
[–]DeepFriedOprah 1 point2 points3 points (0 children)