From jkanter@virginia.edu Fri Dec 6 15:46:32 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 12458475FB8 for ; Fri, 6 Dec 2002 10:46:32 -0500 (EST) Received: from mail.virginia.edu (mail.Virginia.EDU [128.143.2.9]) by postgresql.org (Postfix) with SMTP id 18F7C476450 for ; Fri, 6 Dec 2002 10:42:25 -0500 (EST) Received: from smtp.mail.virginia.edu by mail.virginia.edu id aa10716; 6 Dec 2002 10:42 EST Received: from jlk3xpc (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.11.6/8.11.6) with SMTP id gB6FgMN12724 for ; Fri, 6 Dec 2002 10:42:22 -0500 Message-ID: <005a01c29d3e$8ad6c7a0$de138f80@virginia.edu> From: Jodi Kanter To: Postgres Admin List Subject: proper db standard Date: Fri, 6 Dec 2002 10:45:46 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0057_01C29D14.A1E52150" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/74 X-Sequence-Number: 6569 This is a multi-part message in MIME format. ------=_NextPart_000_0057_01C29D14.A1E52150 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am creating a simple database that will hold information about various pu= blications. 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 s= ome 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 fie= lds. However, many of the keywords repeat for different publications. In th= is 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 ano= ther possibility that I am overlooking?? Thanks Jodi _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu =20 =20 =20 ------=_NextPart_000_0057_01C29D14.A1E52150 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am creating a simple database that wi= ll hold=20 information about various publications. There are keywords that are associa= ted=20 with these publications and there can be anywhere from 1 to about 6 of thes= e=20 different keywords.
 
As I see it I have two choices:<= /DIV>
 
1) create keyword fields 1-6 in the=20 publications database and accept that some of these fields will be=20 empty.
2) create two tables: "publication" and= =20 "keyword". In this scenario I have no limit on the amount of keywords that = are=20 used and I don't have empty fields. However, many of the keywords repeat fo= r=20 different publications. In this situation I would have some repeating words= in=20 the columns.
 
I lean toward #2 but wanted to see if t= here=20 was a preferred standard or another possibility that I am=20 overlooking??
 
Thanks
Jodi
 

_______________________________
Jodi=20 L Kanter
BioInformatics Database Administrator
University of=20 Virginia
(434) 924-2846
jkanter@virginia.edu

 

 

 

<= /DIV> ------=_NextPart_000_0057_01C29D14.A1E52150-- From dan@langille.org Fri Dec 6 16:04:09 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 031C3476778 for ; Fri, 6 Dec 2002 11:04:09 -0500 (EST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by postgresql.org (Postfix) with ESMTP id 59842475E7B for ; Fri, 6 Dec 2002 11:02:05 -0500 (EST) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id A9AE43F4E; Fri, 6 Dec 2002 11:02:09 -0500 (EST) From: "Dan Langille" To: Jodi Kanter Date: Fri, 06 Dec 2002 11:02:09 -0500 MIME-Version: 1.0 Subject: Re: proper db standard Cc: Postgres Admin List Message-ID: <3DF083B1.10740.B82095C@localhost> In-reply-to: <005a01c29d3e$8ad6c7a0$de138f80@virginia.edu> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/75 X-Sequence-Number: 6570 On 6 Dec 2002 at 10:45, Jodi Kanter wrote: > I am creating a simple database that will hold information about > various pu= blications. 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 s= ome of these fields will be empty. That is unnormalized data and will make queries more awkward. > 2) create two tables: > "publication" and "keyword". In this scenario I have = no limit on the > amount of keywords that are used You can control the number of keywords in the application and via triggers in the database. > and I don't have empty fie= lds. What is the signifiance of empty fields? You can always determine the number of keywords for a given publication with this: select count(*) from keywords, pubication where keywords.publication_id = publication.id; > However, many of the keywords repeat for different publications. In > th= is situation I would have some repeating words in the columns. There's nothing wrong with that > I lean toward #2 but wanted to see if there was a preferred standard > or ano= ther possibility that I am overlooking?? I would recommend #2. -- Dan Langille : http://www.langille.org/ From nickf@ontko.com Fri Dec 6 17:12:54 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 757E3475DA3 for ; Fri, 6 Dec 2002 12:12:54 -0500 (EST) Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (Postfix) with ESMTP id DEA61475A9E for ; Fri, 6 Dec 2002 12:12:53 -0500 (EST) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.12.6/8.12.6/Debian-6Woody) with SMTP id gB6HCwpq030863; Fri, 6 Dec 2002 12:12:59 -0500 Reply-To: From: "Nick Fankhauser" To: "Jodi Kanter" , "Postgres Admin List" Subject: Re: proper db standard Date: Fri, 6 Dec 2002 12:08:38 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: <005a01c29d3e$8ad6c7a0$de138f80@virginia.edu> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/76 X-Sequence-Number: 6571 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