2

I would like to port a PHP/MySQL-based client/server application to be a standalone desktop application written in Java. The database has grown to be fairly large, with several tables with hundreds of thousands of rows. I expect these could grow to over a million entries for certain tables.

What embedded database would best handle this? HSQLDB and Sqlite seem to be the obvious choices, though I'm guessing there are others out there as well. My main priorities are the ability to perform queries on large amounts of data efficiently (this thread seems to confirm Sqlite can handle this) and the ease with which I can import old data from MySQL (I remember HSQLDB being kind of a pain for that).

Note: I am aware that similar questions comparing embedded databases have been posted before (for example here and here) but as my priorities differ somewhat from most applications considering the large data migration I thought it justified a new question.

Community
  • 1
  • 1
Hybrid System
  • 798
  • 12
  • 25

2 Answers2

3

The worry you'll have, which will become less of a concern as time goes on, is whether you'll have users with inadequate memory to handle those millions of rows in an embedded database.

When everyone has a 64 bit operating system and 8GB of RAM or more you'll be in the clear.

I agree that SQLLite or Hypersonic can handle it as long as there's sufficient memory. I'd wonder what each will do for those situations where memory becomes scarce.

You certainly have the option to run Hypersonic in server mode and let it keep data on disk. This might be an attractive alternative, especially as SSDs become prevalent. You can keep the convenience of not requiring a database install and still manage large data sets without exhausting available RAM.

duffymo
  • 305,152
  • 44
  • 369
  • 561
3

Latest versions of HSQLDB are used for commercial apps with gibabytes of data. HSQLDB's persistence mechanism has been thoroughly tested and its systematic use of fsync avoids data loss. Query optimisation has improved. Data import from CSV or SQL dumps is now very easy with the HSQLDB SqlTool

fredt
  • 24,044
  • 3
  • 40
  • 61
  • Looks like you have a professional attachment to hsqldb, fredt. No worries from me, but it's good to know the influences on views expressed here lie. – duffymo Jun 30 '12 at 17:43