Reputation: 12594
I need SQL functionalities for a Java JSE application, but dont need a whole SQL server, with things like listen on a port, connection string or even a standalone process to be runned or configured.
I also would prefer to work with files as storages, so that file path identifies DB data.
So given to the DB API the name of a file, I would need perform SQL with the file as DB storage, supporting tables, search, joins and inserts, without thinking to things like ports, external processes, server installation, ecc.. Without any other configurration action, since any other configurable feature is not needed.
Is there some library, preferrably installable as single .jar, that provides this functionality?
If there is not this library, which file-based DB is the simplest to configure and use within JSE, and which configuration steps are needed to perform a query in the provided DB and deploy it with (working) the java .jar application?
Upvotes: 1
Views: 310
Reputation: 1575
I have used HSQLDB in the past and liked it. Depending on what your needs are, you might also be interested in JoSQL which allows you to do SQL type of queries on java collections.
Upvotes: 0
Reputation: 309028
Sure, Hypersonic SQL or Derby, the database that comes bundled with Java 7, will both fill the bill. SQLite would be a third alternative.
Upvotes: 3
Reputation:
I like H2 Database very much. It compares very well with other database engines.
Upvotes: 4