Search code examples
javamysqlderby

Does embedded Derby database go in Java jar?


I am working on project in java where I need to have both app as well as Database to be on USB . I am thinking of either:

1) Installing MySQL on USB. But then I don't know how I would connect to my database that way. I also don't know how I would transfer the project from my development environment to client environment.

OR

2) Using embedded database like derby. I would package my app in jar and give it to the client. He could then keep it on USB and run it from their. In this case where would the database be stored? Will it be stored in the jar file? And if so how do I update my database in these scenario? Can I use ij tool from derby? I am relatively new to derby.


Solution

  • For a great introduction to Derby and its features, follow this series of tutorials: http://db.apache.org/derby/docs/10.9/getstart/cgstutorialintro.html