From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Dane Springmeyer <blake(at)hailmail(dot)net> |
Cc: | Postgres General List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Normalization tools for postgres? |
Date: | 2007-11-21 08:34:17 |
Message-ID: | 4743ED89.5080504@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-php |
Please don't start a new thread by replying to another question.
If you are going to do that, please don't cross-post it in addition.
This doesn't appear to be anything to do with PHP.
Dane Springmeyer wrote:
> 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 don't know of any tool that could do this automatically. Without
understanding what the columns *mean* how could it.
> I noticed this tool for mySQL which captures what I am looking for:
> http://www.sqldbu.com/eng/sections/tips/normalize.html
Well, given that the example just shows the author doesn't know what 1NF
means, I don't think it does do what you want.
> 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.
I don't see any reason why the INSERTs won't work for PG just as well.
> Perhaps a customized php script could accomplish the same thing for
> postgres?
>
> Any suggestions would be helpful.
Can you state what problem you are trying to solve? Do people just email
you flat files and ask you to send them a relational database back? Is
there a specific file that gets imported on a regular basis?
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Sander Steffann | 2007-11-21 08:47:45 | Re: IP addresses |
Previous Message | Richard Huxton | 2007-11-21 08:32:50 | Re: PostgreSQL is not behaving consistently across platforms |
From | Date | Subject | |
---|---|---|---|
Next Message | gunartha | 2007-11-21 19:30:56 | string function |
Previous Message | Dane Springmeyer | 2007-11-21 07:14:15 | Normalization tools for postgres? |