Re: Lookup tables

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Rich Shepard <rshepard@appl-ecosys.com>
Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2025-02-04T14:41:37Z
Lists: pgsql-general
On Tuesday, February 4, 2025, Rich Shepard <rshepard@appl-ecosys.com> wrote:

> Should lookup tables have a numeric FK column as well as the description
> column?
>
> If so, how should I add an FK to the two lookup tables in my database?
>

Most do (have a surrogate PK) since it removes cascading updates and is a
smaller value.

Lots of alter tables and update queries.

David J.