Giving up on MongoDB

Dec 27, 2017

Part of quitting Twitter necessitate rebuilding Grumpy Gamer. The Thimbleweed Park dev blog was based on the Grumpy Gamer blog code, but I'd made a lot of improvements that I loathed losing, but even the Thimbleweed Park blog code was starting to feel old and worn.

It was time to start over, and by start over, I mean completely start over. I crave change. When I find myself in a rut, or lacking motivation, I strive to change as much as I can to spark my imagination.

Writing a new blogging platform from the ground up (again) was what I needed. It's not rocket science, which is exactly what I needed.

My first decision was what to do about the database. The old-old Grumpy Gamer blog used MySQL, but when I rebuilt that into the old Grumpy Gamer blog I became fascinated with MongoDB. I'd worked a lot in a structured database, and the unstructured nature of MongoDB was enticing. Need a new data column? Just write to one.

MySQL was feeling very heavy, MongoDB felt light and fast.

Three years later, I am back to MySQL and I can arbute that to two things:

  1. The lack of a web based tool to quickly manage and query the DB. There are web based tools, but none of them (that I found) can display your data in anything that resembles a table to quick scanning and editing. Any time I needed to "massage" the DB outside the blogging admin tools, I dreaded it.

  2. The MongoDB query language is a mess. You're basically constructing JSON/Javascript queries and it just reeks of being wedged into that format. SQL might not be much better, but at least I know it well.

After a few years with MongoDB, I'm also realizing that I was incorrect in one of my initial assumptions: MongoDB is no faster than MongoDB and the footprint on the server is about the same.

I'm sure MongoDB is better for certain tasks, and MySQL for others, but it largely comes down to what you know and what your comfortable with. For me, that was SQL.

P.S. I don't like that MySQL is owned by Oracle, but I'm not sure I want to make the jump into PostgreSQL. Maybe the next time I'm feeling bored and unmotivated.