finds.dev

akitaonrails/akitando_episode_0118

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

View on GitHub

★ 263JavaScriptupdated May 2022

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
263
Forks
36
Language
JavaScript
Last commit
18 May 2022

// nearby

If akitando_episode_0118 isn't quite it.

All repos →