public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kent Dorfman <[email protected]>
To: Lok P <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Design strategy for table with many attributes
Date: Thu, 4 Jul 2024 16:35:30 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKna9VbQ=o2Yhjo1EitaxzYpWAXe9vw6QtamzCsNNp2-rQOFSA@mail.gmail.com>
References: <CAKna9VbQ=o2Yhjo1EitaxzYpWAXe9vw6QtamzCsNNp2-rQOFSA@mail.gmail.com>
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.
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Design strategy for table with many attributes
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox