Re: Design strategy for table with many attributes - Mailing list pgsql-general

From Lok P
Subject Re: Design strategy for table with many attributes
Date
Msg-id CAKna9VaNKPR9XruS-yz0qLLgAyik6L-_kGX=C8B682wRSmnn=A@mail.gmail.com
Whole thread Raw
In response to Design strategy for table with many attributes  (Lok P <loknath.73@gmail.com>)
List pgsql-general

On Fri, Jul 5, 2024 at 10:45 AM Guyren Howe <guyren@gmail.com> wrote:
On Jul 4, 2024, at 22:07, Lok P <loknath.73@gmail.com> wrote:

If you stick to the principle of grouping columns in a table when you use those columns together, you should be good.

Note that you might want to split up the “parent” table if that naturally groups its columns together for certain uses. In that case, you could have the same pk on all the 1:1 tables you then have. In that case, the pk for each of those tables is also the fk.


Thank you.

When you said below,
"Note that you might want to split up the “parent” table if that naturally groups its columns together for certain uses. In that case, you could have the same pk on all the 1:1 tables you then have. In that case, the pk for each of those tables is also the fk."

Do you mean having a real FK created through DDL and maintaining it or just assume it and no need to define it for all the pieces/tables. Only keep the same PK across all the pieces and as we know these are related to the same transaction and are logically related? 

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Design strategy for table with many attributes
Next
From: Lok P
Date:
Subject: Re: Design strategy for table with many attributes