The wonders of Netbeans and CSV uploads
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
Start a new Project
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.