简体   繁体   English

sqlite和hibernate - 好主意?

[英]sqlite and hibernate - is good idea?

I am developing a small desktop application with Java + Hibernate. 我正在使用Java + Hibernate开发一个小型桌面应用程序。 I am using MySQL for development but want to replace it with light version of SQL like SQLLite . 我正在使用MySQL进行开发,但希望用SQLLite这样的轻量级SQL替换它。 I want to do this for following reasons: 我想这样做是出于以下原因:

  • To avoid installation and configuration of MySQL. 避免安装和配置MySQL。 This will allow my clients to install and configure the application on their own. 这将允许我的客户自己安装和配置应用程序。
  • To ease backup and restore of DB. 简化数据库的备份和恢复。
  • etc. 等等

I found SQLLiteDialect, its configurations and a working sample eclipse project(uses hibernate3) on http://code.google.com/p/hibernate-sqlite/ . 我在http://code.google.com/p/hibernate-sqlite/上找到了SQLLiteDialect,它的配置和一个工作示例eclipse项目(使用hibernate3)。

But when I read the comment on a question : " Since SQLite database is widely used and it is not well supported by Hibernate in java,it's not easy to use SQLite with Hibernate " I got frightened. 但是当我读到一个问题评论时 :“ 由于SQLite数据库被广泛使用,而且在Java中Hibernate不能很好地支持它,所以使用SQLite和Hibernate并不容易 ”我受到了惊吓。

Can you please suggest me - is it a good idea to use SQLite here? 你能建议我 - 在这里使用SQLite是个好主意吗? Are there any alternative to SQLite that is well supported by Hibernate? 有没有Hibernate支持的SQLite替代方案?

I think there are pros and cons to every DB out there. 我认为每个数据库都有利弊。 For embedded DB's, you could also look at HSQLDB or H2DB. 对于嵌入式DB,您还可以查看HSQLDB或H2DB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM