Re: Lookup tables
Ron Johnson <ronljohnsonjr@gmail.com>
From: Ron Johnson <ronljohnsonjr@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Date: 2025-02-04T14:56:26Z
Lists: pgsql-general
On Tue, Feb 4, 2025 at 9:41 AM David G. Johnston <david.g.johnston@gmail.com> wrote: > 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 > How does a synthetic PK "remove cascading updates"? Doesn't the decision on whether or not to cascade update depend on the ON UPDATE CASCADE clause of the FK definition? -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster!