Re: Lookup tables - Mailing list pgadmin-support

From Tony Shelver
Subject Re: Lookup tables
Date
Msg-id CAG0dhZBNiGSQ_hiRcMPP27z_1ZEiNadcgv0Ui5e34o26FQEv-A@mail.gmail.com
Whole thread Raw
List pgadmin-support
Seen the suggestions.

After decades of playing with the alternatives, I don't overthink it anymore.  Pretty much my lookup tables consist of an autogenerated primary key (smallint or integer), a code (name?) and a description as default. 

If there are a lot of tables fitting a common  data format, at times I have consolidated them into a single table with a 'lookup type' column. 

Depending on application requirements, sometimes there I will provide short and long display names, and a generic description for further clarification, but usually those requirements are overkill.

Tony

On Tue, 4 Feb 2025 at 16:28, 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?

TIA,

Rich


pgadmin-support by date:

Previous
From: Yogesh Mahajan
Date:
Subject: Re: Unable to start pgAdmin on first install
Next
From: Yogesh Mahajan
Date:
Subject: Re: Pgadmin