Build Your Own Database from Scratch
build-your-own.org
build-your-own.org
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.
The experience of building a toy db created a schema onto which a lot of my on-the-job learning required.