I’m deranged. I like normalization. Apparently (according to Claude), it can over-engineer things, but I like it. In a recent convo, I explored the pros and cons of using a db with normalized tables built for expansion versus a simple db designed for my specific use case. I have a little weight tracker app deployed to my homelab. It’s simple.
I like the idea of KISS and my app is simple. It’s designed to run on my homelab and served to friends and family. A user signs up. It stores name, email, etc in a users table. A user makes an entry. It stores those attributes in a weight_entries table.

I was curious as to why two tables in a sqlite db was deemed ‘good nuff’. There’s a couple of reasons Claude gave. The audience is tiny and trusted (thanks….I think?). The risk profile is different from a public app. Ah! Now I’m interested. After my cybersecurity profile, I find threat profiling pretty fascinating, trying to find that balance of security vs usability. Also, the two tables are enough to answer the core functionality of the app: store weight values and record users. Everything else (weight systems, units, sessions even) is infrastructure around those features. Plus sqlite is more than cable of occasional writes for weight entries given my tiny audience….I’m going to need therapy after that.
“The best database design is the one that’s actually shipped and working.”
Now hold up. What happens if I gain a Keyboard of Charisma +5 and gain a crap ton of friends? Also, some of my friends might be a little shady. I don’t judge. What about my threat model then? Ok, so now we probably need a proper authentication model. We should use some session data. What about resetting passwords? How’s that going to look? While we’re at it, there’s Imperial vs Metric. Wouldn’t it be fun to know how many stones I weigh? Now this simple app has a layer of complexity.

Now we can change passwords without altering the user table. Do we want to add social authorization via Google, Apple, etc? Now we can add to it without altering the user table. We can make up our own weight system if that’s what we’re going for.
So here’s where the deranged part kicked in. I’m not changing the db to this yet. I just wanted to design it. The goal with my weight tracker app has already been met: I run it from a docker container and it works fine. My next goal is to package it up and release it on github for anyone that also wants to run int. It’s simple and neat. Where it goes from there, I dunno, but this was a good exercise.

