On 2/4/25 07:19, Ron Johnson wrote:
How big is the database? A tiny 500MB db just for you can get by with
poor design. (But then, why are you using PG instead of SQLite?)
For the reasons listed here:
https://sqlite.org/quirks.html
In particular:
[...]
2. SQLite Is Embedded, Not Client-Server
3. Flexible Typing
SQLite is flexible with regard to datatypes. Datatypes are advisory
rather than mandatory.
4. Foreign Key Enforcement Is Off By Default
[...]
More importantly, will you ever update the descriptions? Of course not!
Famous last words. Having a separate PK means that you update one row
in one column, while what you've done means that tens/hundreds of
thousands of rows in possibly dozens of tables need to be updated.
It also means that *you* can easily change things in your ad hoc
database *without forgetting* to update a table.
This is called an "update anomaly" in relational design theory.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx