> 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.
For me, reading about B+ trees and figuring out how many db-pages get touched in an operation was enough without having to write any implementations myself. For others it could solidify understanding. If your db uses LSM Trees then characteristics are different again, so YMMV.
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.