Reputation: 28375
Is there a "best" or more popular database for standalone Java app? I'm currently writing by hand, but I would like to know what is commonly done, if there is something that is commonly done.
update: talking about small app (may grow, but its small for now)
Upvotes: 10
Views: 6775
Reputation: 16
For a SQL option, you could try MySQL, SQL Server, PostgreSQL, or Oracle. Those seem to be the most popular among Java developers.
If you want something NoSQL, MongoDB is the most popular choice with Java developers based on StackOverflow data from 2022.
You can find more information on the metrics used to make that determination in this article.
Upvotes: 0
Reputation: 1
apart all those mentioned here, one can also go for H2 database which is light and can be used in-memory or in server mode.
Upvotes: 0
Reputation: 597324
The main competitors - HyperSQL (HSQLDB), JavaDB (Derby) and SQLite (not java-based) were mentioned.
There are a few other options:
Upvotes: 1
Reputation: 308988
Java 6 ships with Derby (renamed JavaDB). It can be used in memory or server mode.
HyperSQL (HSQLDB) is also popular.
Upvotes: 9
Reputation: 346457
Upvotes: 0
Reputation: 6149
For development purposes, I often use the Hypersonic SQL Database (HSQLDB). It's fast and lightweight, and good enough to get started. For a bigger application, I'd go for Derby, which supports more options.
Upvotes: 2
Reputation: 245479
I would suggest using something like SQLite with SQLiteJDBC.
It also sounds like HyperSQL and Derby (which ships with certain Java versions) are popular choices.
Upvotes: 13