what is the difference between jpa and hibernate
来源:互联网 发布:手机吓人软件大全 编辑:程序博客网 时间:2024/05/29 13:15
maybe you have questions about JPA and Hibernate:such what is JPA ?what is Hibernate ? JPA and Hiberneate can bind together?
well,before we start it,we should understand concept of ORM , object relational mapping ,it is the process of mapping objects to database tables and vice versa.
JPA ,Java Persistene API is the specification which provides interface and annotation with the ORM from managing relational database in Java application .and there are several JPA implementations, like Hibernate,IBatis ,Toplink ,EJB .
Hibernate,the ORM implementation framework.success and acceptability of Hibernate framework has made it become the one of most popular persistent framework.
Hibernate can free developer from the database specific coding ,and focus more utilizing on powerful oriented object design principles to implement the core business logic.by using Hibernate you can switch databases rather easily and take advantage of the cache ,in terms of Hibernate second level cache and query cache.
you can annotate the Java domain objects ,but they will not work in running time .only add the implementation framework,such as Hibernate ,with you Hibernate implementation ,you can mange database in java application ,you can map ,query , update, delete to operate tables in Java application.because you use JPA to annotate domain objects ,JPA is framework independent ,it is the specification .so if you want to replace Hibernate with another JPM implementation ,it is easy and smooth.
but when you straight use Hibernate without JPA ,it can not have extra features to replace with another ORM implementation ,you are already lock out inside.
from what have mentioned above, we can come to a conclusion ,the best practices is using JPA and Hibernate together .
- what is the difference between jpa and hibernate
- What is the difference between test, [ and [[ ?
- what is the difference between the setTimeout and setInterval
- What is the difference between DHTML and the DOM?
- What is the difference between the mouseover and mouseenter events?
- What is the difference between AWT and SWT?
- What is the difference between User Control and Custom Control?
- What is the difference between an EXE and a DLL?
- What is the difference between XML and C or C ?
- What is the difference between SMOD and CMOD?
- what is the difference between little-endian and big-endian.
- What is the difference between procedural and nonprocedural language?
- What is the difference between a thread and a process?
- What is the difference between objectForKey and valueForKey?
- What is the difference between Microsoft TMG and UAG ?
- What is the Difference Between http and https?
- what is the difference between ELF files and bin files
- what is the difference between MirrorView, SanCopy, SanpSure and SnapView
- HTTP协议详解
- 线程,Handler,Message和Runnable
- POJ1657-Distance on Chessboard
- Java进阶书籍,高手就要一步一步积累。
- 10 Powerful Quotes From The Steve Jobs Movie
- what is the difference between jpa and hibernate
- 定时发送短信之AlarmManage,SmsManger的使用
- What To Do When The Boss Begs You To Stay
- 省市县联动
- Eclipse maven工程 Missing artifact com.sun:tools:jar:1.6.0:system 解决方法
- 配置归档日志双路径
- java源码阅读
- Android EditText样式
- Uva 10047 The Monocycle