Great toy but it's a bit misleading not to touch on the query planner. All real SQL implementations will plan how to most efficiently run a query so the order of operations can be wildly different to expected based on the data and indexes available. This kind of tutorial makes it look like joins are very inefficient whereas a real database may make them highly efficient for a given query.
I mean that basically in an implementation of indexes. Move the on-the-fly sorts to behind a command, then change the insert/delete code to maintain them, and voila - indexes.
It would be very easy to follow along with a transliteration into any dynamic language language with halfway decent support for functional programming.
It's ~150LOC but doesn't have aggregates (yet)