For complicated reasons I was involved in a successful project to develop an open-source, Oracle-SQL-compatible, transactional-integrity-preserving, extensible database designed for in-memory performance in Java. In the process of this development "suddenly" the reasons for a whole bunch of performance and syntax oddities in databases like Oracle and PostgreSQL became very clear.<p>I was shocked to learn that was 15 years ago when I looked up the link to share, but if you are interested in the topic of "how to implement a database" it may be worth a look.<p>For what it is worth it was listed (not by me) on the C2 Wiki on the "Programs to Read" Page, where it was described as "[A] database written in Java with good unit tests and ShortMethods." [1]<p>Both statements are true, for a complete working example of a production database (it supported a commercial product for at least 10 years) it is actually a pretty accessible and well documented code-base.<p>The project is called AxionDB and can be found at [2].<p>[1] <a href="http://wiki.c2.com/?ProgramsToRead" rel="nofollow">http://wiki.c2.com/?ProgramsToRead</a>
[2] <a href="http://axion.tigris.org/source/browse/axion/" rel="nofollow">http://axion.tigris.org/source/browse/axion/</a>
How is this #2 on Hacker News? There's literally nothing here about how to actually build a database (yet?)<p>Instead, there's just a key-value store implemented on top of a javascript hashmap and a filesystem.
Why would a pedagogical project choose JavaScript of all languages?<p>Unless the project <i>specifically</i> needed to leverage features of the language, or a web browser, it's an incredibly poor choice for building anything with well maintained abstractions. Or anything at all ready, when the language is covered in warts.<p>I imagine the author hasn't yet discovered for themselves why it's a poor choice, given only a key-value store has been implemented (using JSON.stringify, no less)
I realized how little i knew about how databases work until I watched this lecture series.
<a href="https://www.youtube.com/channel/UCHnBsf2rH-K7pn09rb3qvkA" rel="nofollow">https://www.youtube.com/channel/UCHnBsf2rH-K7pn09rb3qvkA</a><p>Does anyone have DB internal book recommendation that inst' boring as hell.
Not a lot of content yet, but building databases (even toys) is an incredibly interesting exercise which I encourage many more people to try out, so +1!<p>For anyone else who is interested in learning how to build a database, can I thoroughly recommend following along with Andy Pavlo's Advanced Database Systems course from CMU[1]. Every lecture is accompanied by reading lists, notes, and assignments. Whats more, I find Andy's style to be very easy to parse even on complex topics.<p>Even if you think you know a fair bit about this domain, you will likely learn a lot!<p>[1]<a href="https://www.youtube.com/playlist?list=PLSE8ODhjZXjYplQRUlrgQKwIAV3es0U6t" rel="nofollow">https://www.youtube.com/playlist?list=PLSE8ODhjZXjYplQRUlrgQ...</a>
Since you are creating a new file for each entry, I think BTRFS would be a good choice.<p><a href="https://en.wikipedia.org/wiki/Btrfs" rel="nofollow">https://en.wikipedia.org/wiki/Btrfs</a>