iBATIS与Hibernate的区别

Both Hibernate and iBATIS are open source Object Relational Mapping (ORM) tools available in the industry. Use of each of these tools depends on the context you are using them.

iBATIS Hibernate
iBATIS is simpler. It comes in a much smaller package size. Hibernate generates SQL for you which means you don’t have to spend time on generating SQL.
iBATIS is flexible. It offers faster development time. Hibernate is highly scalable. It provides a much more advanced cache.
iBATIS uses SQL which could be database dependent. Hibernate uses HQL which is relatively independent of databases. It is easier to change db in Hibernate.
iBatis maps the ResultSet from JDBC API to your POJO Objets, so you don’t have to care about table structures. Hibernate maps your Java POJO objects to the Database tables.
It is quite easy to use stored procedure in iBATIS. Use of stored procedures is a little difficult in Hibernate.
Hibernate和iBATIS都是开源的对象关系映射工具。如何选择取决于你应用场景。

iBATIS Hibernate
iBATIS 简单,打包也小。 Hibernate 自动生成SQL,所以你不需要去再花时间去生成SQL.
iBATIS 比较灵活,可以节约开发时间。 Hibernate是高度可扩展的。它提供了更先进的缓存。
iBATIS 使用SQL语句所以它对数据库是有依赖的。 Hibernate 使用独立于数据库的HQL,这样就可以在不同类型的数据库中随意切换。
iBatis 从JDBC的返回集(ResultSet)映射到POJO对象,所以你可以不用关心数据库中表的结构。  Hibernate映射你的Java POJO对象到数据库表。
iBatis中可以很容易的使用存储过程。 相对而言 Hibernate使用存储过程有点麻烦。
原文链接:

http://www.tutorialspoint.com/ibatis/ibatis_vs_hibernate.htm


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值