Lightest Database to be packed with an application

后端 未结 4 555
星月不相逢
星月不相逢 2020-12-29 07:02

I am developing a Java Desktop Application and want a light database that can be used with Hibernate and that can be packed with an application.

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 07:42

    JavaDB (Sun's supported distribution of the open source Apache Derby), HSQLDB (not very active) and H2 (the successor of HSQLDB) are all 100% Java embeddable database engines and can all be used with Hibernate (i.e. there are dialect for them). Refer to this page and this one.

    HSQLDB has the smallest footprint (~700 KB) of all of them. But feature wise (see this comparison), H2 is the clear winner and its footprint (~1 MB) is still smaller than Derby's one (~2 MB).

    The final choice depends on what you need but H2 is a good compromise of features and size (in other words, a big competitor). Have a look at the mentioned comparison.

提交回复
热议问题