From: Nick Fankhauser <nickf@ontko.com>
To: Jodi Kanter <jkanter@virginia.edu>
To: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: Re: proper db standard
Date: Fri, 6 Dec 2002 12:08:38 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGEEANGFAA.nickf@ontko.com> (raw)
In-Reply-To: <005a01c29d3e$8ad6c7a0$de138f80@virginia.edu>
Jodi-
Given you two choices, I would go for #2, but consider this third option:
Publication:
pub_id
other_stuff
Keyword:
keyword_id
keyword_text
Keyword_assignment:
pub_id
keyword_id
Keyword only contains 6 records, but you can add new keywords as needed in
the future. (Option #1 didn't give you that ability.)
Duplication of data is kept to a minimum.
-Nick
-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi Kanter
Sent: Friday, December 06, 2002 10:46 AM
To: Postgres Admin List
Subject: [ADMIN] proper db standard
I am creating a simple database that will hold information about various
publications. There are keywords that are associated with these publications
and there can be anywhere from 1 to about 6 of these different keywords.
As I see it I have two choices:
1) create keyword fields 1-6 in the publications database and accept that
some of these fields will be empty.
2) create two tables: "publication" and "keyword". In this scenario I have
no limit on the amount of keywords that are used and I don't have empty
fields. However, many of the keywords repeat for different publications. In
this situation I would have some repeating words in the columns.
I lean toward #2 but wanted to see if there was a preferred standard or
another possibility that I am overlooking??
Thanks
Jodi
_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: nickf@ontko.com, jkanter@virginia.edu
Subject: Re: proper db standard
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGEEANGFAA.nickf@ontko.com>
References: <005a01c29d3e$8ad6c7a0$de138f80@virginia.edu> <NEBBLAAHGLEEPCGOBHDGEEANGFAA.nickf@ontko.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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