hibernate 与 mybatis
来源:互联网 发布:信息技术网络研修心得 编辑:程序博客网 时间:2024/06/01 18:48
开发速度的比较:hibernate上手比较慢,mybatis上手快。
开发工作量的比较:hibernate封装了jdbc,减少dao层的工作量。
sql优化的比较:mybatis半自动化的,分离了java和sql语句,可以对sql语句进行优化。
对象管理的比较:hibernate建立了ORM模型,有类和实体的对应关系,可以通过逆向工程生成对应的pojo类。
相同点:都是通过在xml中配置生成sessionfactory,在通过getsessionfactory得到sessionfactory,之后通过getcurrentsession得到当前的session。
hibernate缓存:hibernate缓存分为一级和二级缓存,一级缓存是对于session的缓存,二级缓存是对于sessionfactory的缓存。
mybatis缓存:查询特性缓存。
hibernate优点:1,封装了jdbc,jta,减少dao层是编码,2,自定义hsq语句封装了sql,做到数据库无关系3,建立了object和relation的联系
mybatis优点:mybatis可以对sql语句进行优化,定制查询。
阅读全文
0 0
- Hibernate与MyBatis
- Hibernate与MyBatis比较
- mybatis与hibernate区别
- hibernate与Mybatis区别
- mybatis与hibernate区别
- mybatis与hibernate区别
- mybatis与hibernate区别
- mybatis与hibernate区别
- mybatis与hibernate区别
- mybatis与hibernate区别
- mybatis与hibernate比较
- mybatis与hibernate区别
- Mybatis与Hibernate
- Hibernate与Mybatis对比
- mybatis与hibernate区别
- MyBatis与Hibernate对比
- Hibernate与MyBatis
- hibernate与mybatis比较
- xmlbeans问题(深刻)
- html、js if判断
- 第十四章 SSL——《跟我学Shiro》
- python中 with...as的用法
- 理解http304响应
- hibernate 与 mybatis
- 文章标题
- mysql [Err] 1292
- 同步定位与地图构建SLAM过程
- Android--RadioGroup和Tablayout两种实现底部导航的方式详解
- PHP环境搭建(7)----fpm配置
- [BZOJ 3757]苹果树:树上莫队
- 《python爬虫伊始(百度首页)》
- 第十五章 单点登录——《跟我学Shiro》