I need to build a Java application that I will install on a Linux server.
When people will install they just would need to install this application, launch it, and nothing more. But we have some data to save.
- I said no to MySQL, because it needs a server.
- I said no to XML because there will be really a lot of data to save and manipulate.
So I’m looking at SQLite which is the best I think. Indeed (stop me if i’m wrong), SQLite doesn’t need any server? (just install the final application and SQLite works fine in my application?)
Then I checked at http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers and I’m really a little bit confused.
- What is the difference between a Wrapper and a Driver?
- Plus I see there exists a “pure java implementation”: SQLJet is it more or less optimized?
- Finally what would you use in my situation?
Another database to consider is H2. It is an embedded database engine completely written in Java so you have the benefit of full unicode (16 bit) character support that Sqlite does not have. Other embedded databases are HSQLDB and Derby.
Correct. It does not. Neither does H2.
Correct. As long as you include Sqlite or H2 in your WAR (or unpack it into your jar), it will work fine.
Depends on the usage. I think Sqlite is talking about the fact that when you use the JDBC driver for Sqlite, it is actually a wrapping of the Sqlite C native libraries inside the driver. Typically the JDBC driver talks to a remote database.
H2 also is that way with the “driver” actually doing the database operations just that it was written in Java so you don’t need the C wrapper.
This is the first I’ve heard of Sqljet so I’m not sure. The Xerial Sqlite driver is what I’ve used and it’s performance seems to be good.
I’d use H2 myself for the native Java features.