Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Insert into database with Java

 
Cloey Tan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4015
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic