Get the top HN stories in your inbox every day.
brap
vira28
+1 reg the author point. I would like to know whose book I am getting.
I understand that sometimes people want to keep their identity private but for an author it's tough.
pcthrowaway
This is like wanting someone authoring a PR on github to have their about section filled out. Maybe it's nice for the reviewer to have, but some authors prefer to let the content to speak for itself. I think that's fair.
hotstickyballs
For someone trying the learn new information (and thus lacking the ability to discern), its not possible to let the content speak for itself
cloudripper
Past HN posts for author's other book, "Build Your Own Redis":
https://news.ycombinator.com/item?id=34557389 (Show HN - 5 comments)
https://news.ycombinator.com/item?id=34572263 (129 comments)
https://news.ycombinator.com/item?id=35212660 (65 comments)
_aaed
intelVISA
build-your-own is actually good unlike that link though..!
jrvarela56
The book recommends that website: https://build-your-own.org/database/
Why do you say the codecrafters stuff is lower quality?
cloudripper
Can you provide some context? Curious what informs your thoughts on codecrafters' quality...
intelVISA
Well, one's a decently comprehensive book and the other's SaaS aimed at embezzling your employer's learning budget - wider lang support but lower quality.
Maybe the problem is the format...
aidos
For a supplementary angle I’d highly recommend having a nose in both the Postgres docs and source. They’re both very readable.
I think the section on internals is a good jumping off point that leads to a lot of deeper content.
jmartrican
We have so many database products out there. But if this book leads to more of them, I'm all for it. I think databases, while old as IT itself, still has room to evolve, especially in the distributed realm, and especially in the multi-master configuration where I do not see many products being offered, as compared to one-writer configurations.
didgetmaster
The book suggests building a database on top of a KV store. This is precisely what I did with my project. I was initially building a product that I hoped would be able to replace existing file systems and I needed an architecture that made it easy to create meta-data tags for every file and then find every file that had certain tags very quickly. I implemented the tags using a set of novel Key-Value stores that I invented.
Once I had it working, I realized the KV stores I used for tags were just like columns in a relational table built within a columnar database. Querying for files based off their tags was very much just like SQL queries for table rows. So I tried using them to create relational tables.
They turned out to be incredibly fast at a variety of queries (the bread and butter of databases) without needing to create separate indexes in order to get optimal performance. I thought database experts would be intrigued when I showed how much faster my system was than other conventional RDBMS setups on the same hardware. I guess I was surprised when almost no one was even curious how it did it.
Here is a simple, short video comparing it to SQLite: https://www.youtube.com/watch?v=Va5ZqfwQXWI
hobs
I think the problem is that every relational query can be implemented a KV store, but usually the trade offs and bugs in your nascent query engine IS boring, and we can already use a bunch of hella fast KV stores out there if you dont care about ACID or you are willing to give up your decades long implementation details on SQL engine of choice.
layer8
I believe the aim of the book is more to promote a basic understanding of how relational databases work internally, by way of implementing a simple one oneself, an understanding which is generally helpful when using databases, and not so much to cause new database products to be created.
submerge
As someone who lacks a formal CS education and wants to know more about how databases work, I have been eagerly awaiting this book. I also want some practical golang projects to work on so this is perfect! I'm so excited!
ikiris
its kind of frustrating how this description of the book doesn't even mention what language is used in the examples.
layer8
I agree it could have been mentioned. Section 0.2, however, part of the short introduction page [0], provides the information:
The book uses Golang for sample code, but the topics are language agnostic. Readers are advised to code their own version of a database rather than just read the text.
undefined
treeman79
Built college newspaper website back in ‘99 got tired of maintaining it by hand. Discovered PHP when it was new. Wanted to build a content management system. SQL sounded hard so I wrote my own database. Worked great for the years I was at the college.
vira28
Is the final solution available somewhere that I can build and run?
I see the code in sparse but wanted to get the feel end to end.
Kinrany
It's a very short book, takes half an hour at most to read through if you skip implementation.
polskibus
Woah great! I’d love an Andy Pavlo review of it ;)
sfc32
What language is the tutorial in?
efficax
the book uses golang
freedomben
Indeed. The Redis book was C/C++ so I was hopeful that this one would be as well. Given that database essentials are so closely tied to system calls, I would have hoped for a language that doesn't abstract them away. At least in the first fsync() call, the author does explicitly mention that `fp.Sync()` ends up invoking `fsync` system call, but as someone who has no intention of returning to Golang I'd rather not have to add complexity by requiring me to build and maintain a mental map of Golang calls to syscalls (the worst kind of abstraction layer IMHO: leaky and unnecesary).
macintux
It’s interesting that it doesn’t seem to actually say that anywhere.
vira28
write on the introduction it says https://build-your-own.org/database/00a_overview
Or if you see any chapter you can literally see Go code.
throw10920
Interesting choice. I'd think that as the context is "As many of today’s (2023+) coders do not have a formal CS/SE education" and the goal is education, a more popular language like Javascript or Python (or, heck, even PHP[1] /s) would be used, instead.
I've taken a look at Go, and while it does seem pretty approachable, it's definitely not nearly as common as Python/JS, and it's always significantly harder for me to learn a new concept when the examples are also in a language I'm unfamiliar with. Maybe that's just me, though.
[1] https://survey.stackoverflow.co/2022/#most-popular-technolog...
jandrewrogers
I think Go is a pretty good choice for the purpose. It balances high-level ease of use and learning curve with decent access to the system-y parts of coding that are so important to databases. What you learn to do in Go will translate reasonably well to a true systems language if the user wanted to take database engine design to the next level.
Languages like Python or Javascript are so far removed from the system-y side of programming that the way you would implement the concepts in those languages would not translate to the way you would actually build a "real" database which is I think the purpose of the book. I think the objective isn't to teach the abstract concepts but how those concepts are expressed in real systems.
iknownothow
I'm a data engineer and I only know Python. It appears Golang hits a sweetspot on many metrics such as performance, parallelism, ease of use etc and since 2016 there's been a lot of new data products and tools written in Golang. So it makes sense to me that the book would use a popular language for the domain.
switchbak
Databases really do push runtimes in such a way that I think it makes sense to urge folks to use a system level language, or something close to it. In particular it'd be hard to cover concurrency (and parallelism) properly using vanilla CPython or JS, and I think that would impinge on the lessons learned.
That said, it'd be an interesting read on how to make a DB in pure Python.
wjholden
I could be wrong, but my perception is that Go is so opinionated that you'll either write idiomatic Go or use another language. So, from that perspective there's some goodness in using Go as a learner's systems language.
zacksiri
This is something I’m going to be buying for sure. I saw the site also has a “Build your own Redis”.
I’ve always wanted to understand how databases work so I can build my own.
Excited about this!
Get the top HN stories in your inbox every day.
While I’m not in the target audience for this, I skimmed through the first chapter and this seems really cool - great job! I will definitely keep this one in mind if it ever becomes more relevant to me.
One small comment: the /about page only has the books listed and nothing else. Some people will probably be interested in knowing a thing or two about the author before getting the books (and there are probably a million people with the same name, so difficult to Google)