From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Lookup tables |
Date: | 2025-02-04 16:06:00 |
Message-ID: | ba9a951a-d910-4ae0-acd6-dda853e18da4@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support pgsql-general |
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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Michał Kłeczek | 2025-02-04 16:31:13 | Re: Lookup tables |
Previous Message | Rich Shepard | 2025-02-04 15:41:48 | Re: Lookup tables |
From | Date | Subject | |
---|---|---|---|
Next Message | Henning Garus | 2025-02-04 16:23:39 | Index usage with differing string types |
Previous Message | Rich Shepard | 2025-02-04 15:41:48 | Re: Lookup tables |