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

From Kent Dorfman
Subject Re: Design strategy for table with many attributes
Date
Msg-id 322e1d7a-7c86-a3e4-4c01-7aaa9b053255@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 7/4/24 15:37, Lok P wrote:
Or say, what is the maximum number of columns per table we should restrict? Should we break the single transaction into multiple tables like one main table and other addenda tables with the same primary key to join and fetch the results wherever necessary?

900 columns makes my head hurt badly...

The neophyte will design a table with a separate field for each type of phone number that may be encountered.  The experienced designer will move all phone numbers to its own table, where each entry/row contains a reference link, a "number_type" field, and a field with the actual number in it...Three fields in a table that is manageable and can be queried/modified without stressing the database server.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Configure autovacuum
Next
From: Ron Johnson
Date:
Subject: Re: Design strategy for table with many attributes