I never wrote a database engine, unless you count writing code to read, write, and update flat files. I remember doing that early in my life with a friend as we tried to build our fantasy baseball game system. We needed a way to handle data, and use flat files, setting tokens to denote various "rows" and columns of data. I'm not sure that's much of a database, but that's the most I've done in building an engine.
Someone decided to tackle building a SQLite clone in C and wrote a series of articles on the process. They are an interesting read as the author works his way through adding new functionality for the engine. While I wouldn't want to actually recreate a database engine that I needed, the exercise is interesting. My C knowledge is a little rusty, but I can follow along enough to appreciate the way that the application takes shape.
Writing software is often a challenge when we are creating a new system from scratch. It is often easier when we are trying to copy something that already exists, but there is still an effort to recreate all the functionality that already exists. However, it's a good exercise and one that often helps software developers build stronger skills and practice their craft.
If you were going to practice writing some code, database or otherwise, what would you like to write? Would you attempt a database engine? Many of us know how quite a bit about how SQL Server works, but I don't know if we'd actually want to recreate the code for some part of the system. When I learned how the memory-optimized tables were structured, I had fond memories of building similar linked lists in university, though at a far simpler (and less efficient) level.
I find myself tackling some problems to help others, or teach them a technique, but I haven't had to build a full set of software in years. Maybe I'll find a project at some point that I really want to tackle and actually build something larger. Finding the spare time to tackle a project is hard, but I'm ever hopeful that I'll make the effort at some point.