I have a Java SE application, and it uses a database. I am currently using XML files to store data, but I´m afraid it causes some errors in later use.
So it would be good to use a Postgree/MySQL like DB. A real database. but the problem is, it is a commercial application, it runs under windows, and should be 2 clicks to install. I really don't like the idea of installing a database together with my application, and then running scripts to build the tables.
Is there a database that I can use as a Java API? Or should I just continue to use XML? (I'm synchronizing every access to my XML files). Whats the best choice?
One of following embedded databases:
They are lightweight, take up very little space and can be embedded without problems in your application.
Since they are written in Java, and each one is a simple jar file, your deployment headaches will be kept to a minimum.
You've mentioned MySQL and PostgreSQL. Although I haven't tried it, H2 features several compatibility modes for various popular databases, including ones you've mentioned.
H2 Database
It can be embedded in your application with no clicks to install and it supports JDBC and most ORMs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With