finds.dev← search

// the find

akitaonrails/akitando_episode_0118

★ 263 · JavaScript · updated May 2022

examples to illustrate my YouTube channel's episode 118 about Databases

A companion repo for a Brazilian YouTube episode explaining how databases work under the hood. It walks through building a toy in-memory SQL-like engine in JavaScript, covering parsing, indexing, transactions, and client/server over TCP. Aimed squarely at beginners who want a mental model of SQL, not developers building anything real.

The progression is well-structured — starts with a naive in-memory filter, then adds an AVL tree index with a benchmark that shows an 8x speedup, making the value of indexing concrete rather than abstract. The append-only transaction log replay is a surprisingly honest demo of write-ahead logging mechanics. Including an ANTLR4 grammar (stripped from SQLite's) exposes beginners to real parser tooling instead of hand-rolled string splitting. The client/server layer over TCP gives a complete picture of the database wire protocol concept in under 100 lines.

The README's copyright notice — 'should not be used out of context, without the permission of the author' — is an odd friction point for something explicitly educational and shared publicly on GitHub. The ANTLR4 parser only covers a tiny SQL subset and the grammar is copied without much explanation of what was stripped or why, so anyone trying to learn from it will hit a wall fast. The B-Tree submodule (B-Tree-Cormen) is listed as a commit reference with no README or context — it will silently be empty for anyone who clones without `--recurse-submodules`. No tests cover the transaction log or the AVL index, so the 'educational' code has no safety net if you actually try to modify it.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →