Re: Lookup tables

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Lookup tables
Date: 2025-02-04 15:18:35
Message-ID: CAKFQuwZxDUwyxrcB8Br0XDTUuy_zPi_CNF+sQorGoM=z4Hwndg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

On Tuesday, February 4, 2025, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:

> On Tue, 4 Feb 2025, David G. Johnston wrote:
>
> The point of a lookup table is to provide a unique list of authoritative
>> values for some purpose. Kinda like an enum. But having the label serve as
>> the unique value is reasonable - we only add surrogates for optimization.
>>
>
> David,
>
> The industrytypes table has 26 rows, the statustypes table has 8 rows. Your
> explanation suggests that for this database adding a PK to each table adds
> little, if anything.
>

It’s the FK side where the cost savings are experienced.

David J.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Ron Johnson 2025-02-04 15:19:34 Re: Lookup tables
Previous Message Ron Johnson 2025-02-04 15:12:33 Re: Lookup tables

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-02-04 15:19:34 Re: Lookup tables
Previous Message Ron Johnson 2025-02-04 15:12:33 Re: Lookup tables