aspose file tools*
The moose likes JDBC 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
Bookmark "Insert into database with Java " Watch "Insert into database with Java " New topic
Author

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
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

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.


My Blog: Down Home Country Coding with Scott Selikoff
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Insert into database with Java