3

I'd like to use an embedded database management system within my Java app that should store all data in one single portable file.

I know already that H2 and SQLite databases seem to fit my needs, but I'd like to see if there are other solutions that are embeddable and are able to save the whole database in a single-file.

I don't insist on relational databases, NoSQL solutions are welcome. For example, if ElasticSearch or Solr could be tweaked to save data in a single file, that would be fine, too.

The solution could include both open source software or commercial software. If it's OSS, it should allow commercial use. The license costs of proprietary software should not be higher than USD 10.000 and the license should permit to distribute the database engine along with my app for an unlimited number of installations.

The database engine should be able to run on:

  1. Windows, Mac OS and Linux systems as well as
  2. Android and iOS ("nice to have").
  • 1
    If I were you, I woudl be going with Sqlite – Mawg Dec 22 '16 at 12:48
  • Are absolutely dead-set on a single file, rather than a folder with a bunch of files? Since in the latter case I have a recommendation for you... – einpoklum Dec 23 '16 at 10:40
  • Well, yes. But maybe give your recommendation as a comment - I'm sure that someone will find it helpful. – dajood Dec 23 '16 at 14:31
  • You may be interested to try Chronicle Map. However, it is key-value database, but allow to store data in a single file. – tysonite Dec 28 '16 at 22:37
1
+100

You can use firebirdsql database.

Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981.

It has friendly license.

This article explains how to use it in embedded mode. (In short - you must place firebird.dll/firebird.so to system PATH before starting your java app)

  • Thank you. I used Interbase/Firebird back in my Delphi time. But is it single file now? If I remember correctly, the databases consisted of a bunch of files. – dajood Dec 23 '16 at 10:21
  • I think it store database in single .fdb file. – ygun Dec 26 '16 at 9:30
  • Thanks a lot, I'll try it and let you know. – dajood Dec 27 '16 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.