Re: Lookup tables

From: Tony Shelver <tshelver(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Lookup tables
Date: 2025-02-04 15:11:00
Message-ID: CAG0dhZBNiGSQ_hiRcMPP27z_1ZEiNadcgv0Ui5e34o26FQEv-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

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(at)appl-ecosys(dot)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
>
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Ron Johnson 2025-02-04 15:12:33 Re: Lookup tables
Previous Message Rich Shepard 2025-02-04 15:08:41 Re: Lookup tables

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-02-04 15:12:33 Re: Lookup tables
Previous Message Rich Shepard 2025-02-04 15:08:41 Re: Lookup tables