Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Incorporating a database into a JAVA program

 
Dwayne Barsotta
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, new to Java, just self teaching. I have a few projects in mind to help me learn while I follow along with some good web based training. One project I want to make will need to store a great deal of information locally and then be able to upload that data to a web database either in real time (if connection is available) or just store the data locally and when the connection is available the user can upload to the web data base.

My original thinking is to have a database service running locally to store the data and then when required have code to send the required SQL commands to update the web data base. Here is my issue. I'm not sure if there is a database that can install and run when my application starts. Meaning user installs my program, this also installs a database service, my program starts and ends the service (??) when it is opened. When the user selects the "Update on Web" (or any other name) a series of SQL commands sends the required information to the web data base.

I can see this idea in my head better then I can explain it. If anyone can understand what I'm getting at. Can you help me with where to look at for a good database that can be installed with my program (or now that I think of it does windows already have such a service installed?) NOT looking for hand holding here, a point in the right direction. I learned VB6.0 and VB.NET this way years ago but never had to deal with databases back then. Any help will be appreciated!!
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about using an embedded database like Apache Derby? Sounds a lot easier than trying to install and managing a windows service from inside a Java application.
 
Ron McLeod
Bartender
Pie
Posts: 1049
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really need a database for what you are doing? If all you need to do is temporarily store some information and then transfer it out later, storing the information in a file would be simpler.

Also, SQLite would be another choice for a small database if you need one.

 
Dwayne Barsotta
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me start by explaining that my "day job" I'm a diesel mechanic for a dealership. My idea is to design a program that will allow us (mechanics) to keep track of our jobs, hours estimates ext . We work on commission. I want to be able to enter information on a specific RO (repair order), there will be a section to enter customer complaints, after you enter a line (we call each complaint a line) there will be a section you can add diagnostics information the tech found, a notes section and also a work completed section. The work completed section is broken down into specific jobs, each job has a code and a set amount of time to complete this specific code. This is set by the original manufacturer.

So just here I need to store customer information, vehicle information, RO information and a table for the codes, time and job description. I want the program to be able to store this data locally if there is no internet connection and allow the user to store this data to the servers database later once there is a connection. I guess I could just store the data in files temporarily, but if I want to give the user the option to not use the web database I would need to use an embedded database. Basically this is my rough draft design, this is why I'm asking about database here, I'm trying to get an idea to follow before I start coding.

Sorry if this is a little hard to read I'm on my phone and this galaxy has a mind of its own.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic