Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

java apps with Mysql Database, want to port my database with my apps

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



I have prepared an application that is a small demo of Student information manipulation. I have stored information related to students in a MySQL DB. Now my application is working 100% on my computer. But I want that work everywhere without depending on Database! I mean I just want "WHEREVER MY .JAR FILE GOES, DATABASE SHOULD ALSO GO ALONG WITH THAT INSIDE .JAR FILE "

So anyone who is using my application or trying it, they can realize exact result of this application.

How can I make this possible? Please someone help me.

For that I have done the following things:

1. I have installed MySQL database on my computer.

2. I have created a database on that MySQL server

3. I have created some tables in the database with a lots of data.. this data is to be used in my whole application, even for login.

Now I want to deliver this application to various clients but my clients are not technical persons and I don't want to give instructions to each of my client to do the above steps.

How can I integrate some functionality into my app so that they can use my database, Tables and Data automatically .

Regards..
 
Marshal
Posts: 28288
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't want your clients to install MySQL on their systems (which is a reasonable thing to not want in your case) then you're going to have to stop using MySQL. If you want a database which goes along with your Java runtime and doesn't require any separate installation then Derby is what you're looking for. I haven't used it myself but from what I've seen you can run Java+Derby without having to run a separate database server.
 
Neha Kaushik
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there any possibility of converting all my MYsql db into another like sqlite.. i mean i have developed my whole apps using mysql.. now changing db leads to a bulk of changes and more thing is i does not have any knowledge about sqlite..
my apps is a window based application.. so there is no need of a server which should be shared by all its users..
Regards..
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neha,
You said:


is there any possibility of converting all my MYsql db into another like sqlite


Yes, of-course you can migrate your MySQL database to another database, including Derby, as Paul suggested.
Your clients will need to install the JDK (as opposed to the JRE).
Please refer to the db subdirectory of your JDK installation.

Good Luck,
Avi.
 
Neha Kaushik
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i got an idea of creating dump files of my db and then create a .bat file for restoring it at users system.. am i thinking in a right direction..??
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i got an idea of creating dump files of my db and then create a .bat file for restoring it at users system.. am i thinking in a right direction..??


No. A DB dump is only useful if the user has the same DB available. Since your dump would be from MySQL, and it was sort of established that it was unfeasible to expect your users to have MySQL, this doesn't really help. (As an aside, a .bat file works on Windows only - is that a realistic expectation with respect to your user base?)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic