Re: proper db standard

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Jodi Kanter" <jkanter(at)virginia(dot)edu>, "Postgres Admin List" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: proper db standard
Date: 2002-12-06 17:08:38
Message-ID: NEBBLAAHGLEEPCGOBHDGEEANGFAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)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(at)virginia(dot)edu

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message dialist 2002-12-06 17:19:31 tedia2sql Announce
Previous Message Bruce Momjian 2002-12-06 16:34:37 Re: Rules/Trigges Trade-offs