X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E4258D1B518 for ; Mon, 22 Sep 2003 15:34:27 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 49928-01 for ; Mon, 22 Sep 2003 12:34:17 -0300 (ADT) Received: from mailhub.mail.Virginia.EDU (mail.Virginia.EDU [128.143.2.9]) by svr1.postgresql.org (Postfix) with ESMTP id BB3B8D1B4EE for ; Mon, 22 Sep 2003 12:34:16 -0300 (ADT) Received: from smtp.mail.Virginia.EDU (smtp.mail.Virginia.EDU [128.143.22.52]) by mailhub.mail.Virginia.EDU (Postfix) with ESMTP id 0C31A8CBA9 for ; Mon, 22 Sep 2003 11:34:16 -0400 (EDT) Received: from virginia.edu (d-137-133-128.bootp.Virginia.EDU [137.54.133.128]) by smtp.mail.Virginia.EDU (8.11.7/8.11.6) with ESMTP id h8MFYEl42120 for ; Mon, 22 Sep 2003 11:34:15 -0400 Message-ID: <3F6F18F7.4000400@virginia.edu> Date: Mon, 22 Sep 2003 11:44:55 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Postgres Admin List Subject: steps to ensure referential integrity Content-Type: multipart/alternative; boundary="------------090909090603070305050401" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/343 X-Sequence-Number: 10431 --------------090909090603070305050401 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I have inherited a database that was originally created in postgres version 6.? There were no steps taken at that time to implement constraints to ensure referential integrity. There are no FK constraints, PK constraints, etc.. Most of what currently exists is done in the existing code. I would like to change this and am interested in getting suggestions. I expect that PK constraints on each table as well as all FK constraints should be in place. Anything else that I should consider? I have indexes currently set up on a variety of fields, including PK fields. Do the constraints automatically generate indexes on these fields such that I should remove the ones created at the end of my script? Thanks in advance for the suggestions! Jodi -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --------------090909090603070305050401 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I have inherited a database that was originally created in postgres version 6.? There were no steps taken at that time to implement constraints to ensure referential integrity. There are no FK constraints, PK constraints, etc..
Most of what currently exists is done in the existing code. I would like to change this and am interested in getting suggestions. I expect that PK constraints on each table as well as all FK constraints should be in place. Anything else that I should consider?
I have indexes currently set up on a variety of fields, including PK fields. Do the constraints automatically generate indexes on these fields such that I should remove the ones created at the end of my script?
Thanks in advance for the suggestions!
Jodi
--
________________________________

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


 

 

 

--------------090909090603070305050401--