Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2C4522E0042; Wed, 21 Nov 2007 03:14:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 23990-03; Wed, 21 Nov 2007 03:14:19 -0400 (AST) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by postgresql.org (Postfix) with ESMTP id 795882E0032; Wed, 21 Nov 2007 03:14:19 -0400 (AST) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id D0BFD49C26; Wed, 21 Nov 2007 02:14:18 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 21 Nov 2007 02:14:18 -0500 X-Sasl-enc: rD8RXP7mdRPKKKLe926c27ZBqajXnmoos7LKgm3uYPOq 1195629258 Received: from [10.0.1.198] (c-67-183-217-40.hsd1.wa.comcast.net [67.183.217.40]) by mail.messagingengine.com (Postfix) with ESMTP id 69A0C3764; Wed, 21 Nov 2007 02:14:18 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <597066.69415.qm@web31806.mail.mud.yahoo.com> References: <597066.69415.qm@web31806.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0ED7C703-6F0A-46DC-93D3-244C9FADE5A5@hailmail.net> Content-Transfer-Encoding: 7bit From: Dane Springmeyer Subject: Normalization tools for postgres? Date: Tue, 20 Nov 2007 23:14:15 -0800 To: Postgres General List , pgsql-php@postgresql.org X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/1114 X-Sequence-Number: 124110 Anyone have recommendations on tools/utilities or SQL approaches to quickly break apart a large imported flat file into normal forms, ideally 1NF or 2NF? I noticed this tool for mySQL which captures what I am looking for: http://www.sqldbu.com/eng/sections/tips/normalize.html Given the fields with data to be output into separate tables, it takes a csv and automatically generates a set of INSERT queries to build all the related tables with new a new primary key for the main table and serialized codes for each of the new tables to maintain relationships. Perhaps a customized php script could accomplish the same thing for postgres? Any suggestions would be helpful. Dane field names for which to break out into their own tables On Nov 20, 2007, at 8:33 PM, Richard Broersma Jr wrote: > --- On Tue, 11/20/07, Finn Lassen wrote: >> Here is a VB code snippet: >> Dim dbOut As ADODB.Connection >> Dim rsOut As ADODB.Recordset >> Set dbOut = New ADODB.Connection >> Set rsOut = New ADODB.Recordset >> .ConnectionString = "Driver={PostgreSQL >> ANSI};Server=localhost;Port=5432;Database=postgres;Uid=postgres;Pwd=n >> one;" > >> Should I have created the table "Contact1" WITH >> OIDS ? > > I wonder if this is a problem with the way your ODBC driver is > configured. If it is a problem with your ODBC driver > configuration, you might also try posting to the PostgreSQL-ODBC > mailing list. > > Also, why did you choose the ANSI driver over the Unicode driver? > > Regards, > Richard Broersma Jr. > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that > your > message can get through to the mailing list cleanly