On Wednesday, May 1, 2024, JORGE MALDONADO <jorgemal1960(at)gmail(dot)com> wrote:
>
> Let's say that tableMain has a string field called "type" with the
> following possible values: "residential", "industrial" and "energy".
>
This, and have the same column in the other tables, but add a check
constraint ensuring only the correct enum value can be specified. Then
your foreign key from the child tables to main is both the ID and the type
field.
David J.