I've made a an app for my wife to help her for the work she does. App is using mysql to save all data. How to make this app use database without having mysql installed on the pc. If mysql is not an option, what is? My target is similar to android apps(.db file or similar).
Asked
Active
Viewed 371 times
2
-
1I think you may use SQLite: https://sqlite.org/ – Ivan Jun 15 '16 at 07:12
-
You can use apache derby (javadb) it works well in embedded mode. – Sanjeev Jun 15 '16 at 07:13
-
There are many java embedded databases available : http://stackoverflow.com/questions/462923/java-embedded-databases-comparison – Arnaud Jun 15 '16 at 07:13
-
Anything special when compiling executable? – fixxxera Jun 15 '16 at 07:22
1 Answers
3
You can use the H2 embeddable database for this case. It comes as a single jar which can be included in your app (has everything in it including the driver and engine). The data will be written to a given location on disk (db file) so the data stored is also portable. H2 is quite robust and supports the standard SQL queries. It's a popular choice for such use cases.

Rajeev Sampath
- 2,739
- 1
- 16
- 19
-
Yes. You'll have to include the jar library and the db file will be created on disk when your app first uses it.. there are some samples on their site you can refer to. – Rajeev Sampath Jun 15 '16 at 07:36