flâneur — a map of the web's best reading

Build Your Own Database

nan.fyi · 3,275 words · saved by 5 readers

A step-by-step guide to building a key-value database from scratch.

If you were to build your own database today, not knowing that databases exist already, how would you do it? In this post, we'll explore how to build a key-value database from the ground up. A key-value database works more or less like objects in JavaScript—you can store values using a key and retrieve them later using that same key: $ db set 'hello' 'world' $ db get 'hello' world Let's find out how they work! Credit where credit is due: This post is largely based off Martin Kleppmann's book Designing Data-Intensive Applications , specifically Chapter 3, "Data Structures that Power Your Databa

Explore this link on the map →

saved by

related reading