jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Insert into database with Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Insert into database with Java " Watch "Insert into database with Java " New topic

Insert into database with Java

Cloey Tan
Ranch Hand

Joined: Feb 03, 2009
Posts: 60
As part of eliminating the need to run the sql scripts manually in order to update existing database, im going to develop a system which can take the scripts from certain classes, and run the scripts from there, sometimes the amount of sql scripts may get huge, and im concerning the performace regarding this action. So i need some consultation, help, guidelines from javaranch forum here before i start off with this. What are some of the major things that need to be taken into consideration when it comes to this? And if halfway running the script certain issues occur, what measures have to take. Your help is very much appreciated!
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Why not write something in JDBC that solves the problem? Writing a program that auto-loads scripts doesn't really eliminate the need for them. You can just have a cron job doing that. To answer your question though, MySQL has some special formats it accepts for bulk loading a file. Please go into more detail about what you are concerned about.

[OCA 8 Book] [Blog]
I agree. Here's the link: http://aspose.com/file-tools
subject: Insert into database with Java
It's not a secret anymore!