• Post Reply Bookmark Topic Watch Topic
  • New Topic

creating a table from the application. is it Inefficient ?

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
assuming i have upgraded my database with a create table statment.
this statment is called from the program everytime the user is requested to do somthing.

question: is it inefficient to "create table" more than once just to make sure the table exist?

of course, if the table exist...I continue with insert/update/etc (thanks to try & catch) but the checking of the creation itself is it a significant time consuming (mind that the program is on a network).

Thanks
peter
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
It could be better not to check Database if it is kinda busy database.
I think you should create Table once . if you have to update your database often then it would be better to make the version of database persistent in some other file format .
Best item is to check the Database status (weather updated or not)from a Properties file.

Even you can make a version table in your database and check the verion from it.

hope it helps
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!