> Databases are not black boxes. Understand them by building your own from scratch!
This is bad advice and not a good use of time. Skimming it could be useful for beginners. Learning a toy implementation isn't going to tell you how to work around the quirks of the db you're using in production. Better to read up about the particular one you use. There are good real books on them that goes into much more detail without spending time typing-in a tutorial.
If on the other hand, you want to scratch an itch and try making one, then by all means go for it.