pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
PKs for dictionary tables 2+ messages / 2 participants [nested] [flat]
* PKs for dictionary tables @ 2002-12-11 19:51 Jodi Kanter <jkanter@virginia.edu> 0 siblings, 1 reply; 2+ messages in thread From: Jodi Kanter @ 2002-12-11 19:51 UTC (permalink / raw) To: pgsql-admin I have a database in which there is a particular data tables that has a lot of dictionary (or lookup) tables hanging off of it. The dictionary tables do not currently have PKs. They consist merely of a list of values that are used to create drop down lists in an application. Would it be more efficient to create PKs for these dictionary tables so that an integer value is stored in the main data table as opposed to a sting value? Is there a preferred database standard? Thanks Jodi _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PKs for dictionary tables @ 2002-12-11 20:03 Nick Fankhauser <nickf@ontko.com> parent: Jodi Kanter <jkanter@virginia.edu> 0 siblings, 0 replies; 2+ messages in thread From: Nick Fankhauser @ 2002-12-11 20:03 UTC (permalink / raw) To: Jodi Kanter <jkanter@virginia.edu>; pgsql-admin The preferred method is to have a PK and store it in your big table. In addition to being more "normal" and probably saving a little space, this gives you the option of changing the corresponding values in one place. So for instance if your lookup table was "datatypes", and you had entered "Sting" at first, after several thousand records had been created that referred to this in the main table, you would be able to correct your spelling for all of them by changing a single field in the lookup table... -Nick -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi Kanter Sent: Wednesday, December 11, 2002 2:51 PM To: Postgres Admin List Subject: [ADMIN] PKs for dictionary tables I have a database in which there is a particular data tables that has a lot of dictionary (or lookup) tables hanging off of it. The dictionary tables do not currently have PKs. They consist merely of a list of values that are used to create drop down lists in an application. Would it be more efficient to create PKs for these dictionary tables so that an integer value is stored in the main data table as opposed to a sting value? Is there a preferred database standard? Thanks Jodi _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-12-11 20:03 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-12-11 19:51 PKs for dictionary tables Jodi Kanter <jkanter@virginia.edu> 2002-12-11 20:03 ` Nick Fankhauser <nickf@ontko.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox