Difference between JPA and Hibernate framework

Before going into the JPA tutorials, I think I need to clarify the differences between JPA and Hibernate because I see if most of you did not understand thoroughly, will not distinguish the difference between them.

JPA stands for Java Persistence API, which is a specification or standard for how we access, store and manage data between Java objects and a lot of databases (Object Relational Mapping). As you can see, as its name implies, JPA is just an API that defines the required specifications and does not have code that implements its specification. It contains only instructions for implementing Object Relational Mapping.

Meanwhile, Hibernate is a framework that implements the JPA specification. Based on the JPA specifications, Hibernate will implement all the features needed for an Object Relational Mapping framework. All changes in the JPA specification, Hibernate must also include updates to implement those changes.

In short, we can see that JPA is an interface, and Hibernate implements that interface.

We can find many other frameworks that implement the JPA specifications, such as Eclipse Link, OpenJPA, etc.

But Hibernate is the most widely used JPA framework!

Chia sẽ bài viết này ...Share on Facebook
0Tweet about this on Twitter
Share on LinkedIn

Add Comment