Java 中 Firebird 和 HSQLDB 之间的选择
我想用 Java 编写一个小型(5-6 个表)桌面应用程序。 我想使用 Firebird 2.1。 数据库。 但我用谷歌搜索并看到了 HSQLDB。 我想在 Firebird 和 hsqldb 之间做出决定。
那么我必须使用哪个数据库?
I want to write a small (5-6 table) desktop app in Java. I want to use Firebird 2.1. database. But I googled and see HSQLDB. I want to make a decision between Firebird and hsqldb.
So which database I have to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Firebird 在自己的进程中运行,您的 java 应用程序需要与其通信。 HSQLDB的优点是它是用java编写的,并且可以在同一进程中运行,这简化了您的安装和运行时检查(数据库是否正在运行,连接错误等)。 它也可以将数据持久保存到磁盘。 另一个选项是 H2 数据库 db,它也可以在进程中运行。
我会选择 HSQLDB 或 H2。
Firebird runs in a process of its own and your java app needs to communicate with it. The advantage HSQLDB has that it is written in java, and can run in the same process, which simplifies your installation and runtime check ups (Is the db running, connection errors, etc.). It can persist the data to the disk as well. AN additional option is the H2 database db, which also can run in process.
I'd go with the HSQLDB or H2.
对于桌面应用程序来说,嵌入式数据库应该足够了。 hsqldb 或 h2 非常适合于此。 您只需将 JAR 文件添加到应用程序类路径中即可。 火鸟看起来更复杂。
实际上,H2 比 hsqldb 更先进。
For a desktop application an embedded database should be enough. hsqldb or h2 are very well suited for this. You just have to add the JAR file to you applications classpath. Firebird looks more complex.
Actually, H2 is more advanced than hsqldb.
Firebird 是非常好的嵌入式数据库,刚刚在 今年的 SouceForge 上获奖
SQLite 在嵌入式方面有很好的表现数据库也是。
Firebird is very good embedded database and just win an award at SouceForge this year
SQLite have good press for embedded Database too.
我推荐 HSQLDB,因为它是用 Java 实现的(因此您拥有与应用程序相同的平台),并且我猜您不需要 FireBird 提供的那种规模的项目的任何功能。
I recomend HSQLDB because it's implemented in Java (so you have the same platform as the application) and I guess that you don't need any of the feature for the project of that size that could FireBird provide.
不要忘记 Java 6 附带了 JavaDB,这对于第一次使用 JavaDB 的人来说可能是一个有用的实现。解决方案。 它是重新打包的 Apache Derby,因此非常强大。
Don't forget that Java 6 comes with JavaDB, and that may be a useful implementation for a first solution. It's a repackaged Apache Derby, and consequently quite powerful.