最轻的数据库要与应用程序打包 [英] Lightest Database to be packed with an application

查看:181
本文介绍了最轻的数据库要与应用程序打包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Java桌面应用程序,并且想要一个 light数据库,可以使用 Hibernate

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.

我将使用 Derby 数据库。它的大小接近2 MB。

I was going to use Derby database. It's size is near 2 MB. But before that I wanted to have views of experts on SO.

是否可以使用 Hibernate

实际上,我是Hibernate的新手,正在研究它需要一个 Dialect 数据库,因此Hibernate有方言 Derby

Actually, I am new to Hibernate and was studying that it requires a Dialect for a database so Is Hibernate has dialect for Derby?

推荐答案

JavaDB (Sun对开源Apache Derby的支持分发), HSQLDB (非常活跃)和 H2 HSQLDB的后继)都是100%的Java嵌入式数据库引擎,可以所有与Hibernate(即有他们的方言)一起使用。请参阅此网页 this one

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具有最小的占用空间他们。但功能明智(请参阅此比较),H2是显而易见的赢家,足迹(〜1 MB)仍然小于Derby的(〜2 MB)。

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).

最后的选择取决于你需要什么,但H2是一个很好的功能和大小的妥协(换句话说,一个伟大的竞争对手)。看看提到的比较。

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.

这篇关于最轻的数据库要与应用程序打包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆