Evolutionary Dawn

March 9, 2008

The wonders of Netbeans and CSV uploads

Filed under: Uncategorized — admin @ 5:03 pm

For the last few years I have written a few applications to merge and reconcile data in spreadsheets.

As of late I have been doing this in Netbeans 6.0 & PostgresQL 8.1 w/ pgAdmin III.

So I will share with the rest of the world my little tricks for making this easier.

Step 1: Model your Data

Model your Data in tables using pgAdmin III. This means look at your spreadsheet and create columns that match.

For example if you have a spreadsheet Employees that contains EmployeeID, Name, PayGroup .

Create a table Employees that contains the fields EmployeeID, Name and PayGroup.

Step 2: Upload your Data

When I discovered how to do this it changed my life. Hopefully it helps you.

COPY employee from ‘C:\\employee.csv’ DELIMITERS ‘,’ CSV;

Simply execute the above statement in pgAdmin IIIs SQL window and BAM!

Your data is in your database.

Step 3: The wonders of Netbeans 6.0

Define a new database connection

New Database #1New Database #2

Start a new Project

New Project Step #1 New Project Step #2New Project Step #3New Project Step #4

After your done with all of that you should get a GUI screen allowing you

to Create/Read/Update/Destroy records in the table from you database.

I usually just delete all of it besides the POJOs and create a simple

Main file to do all of my data changes. It is also very easy to setup

another Table from your database.

NewEntityFromDatabaseNewEntityFromDatabase2NewEntityFromDatabase3


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress