JPA Specification


JavaEEJPARelevant topics

Differences between JPA and Hibernate

JPA is a Java specification that is used to access, manage and persist data between Java object and relational database. It is a standard approach for ORM.

Hibernate is a lightweight open-source ORM tool that is used to store Java objects in the relational database system. It is a provider of JPA. It follows a common approach provided by JPA.

Below are the differences between JPA and Hibernate :

JPA Hibernate
Java specification for mapping data in Java application ORM framework that deals with data persistence
Does not provide any implementation classes Provides implementation classes
Uses platform-independent query language called JPQL (Java Persistence Query Language) Uses its own query language called HQL (Hibernate Query Language)
Defined in javax.persistence package Defined in org.hibernate package
Implemented in various ORM tools like Hibernate, EclipseLink etc Provider of JPA
Uses EntityManager for handling the persistence of data Uses Session for handling the persistence of data



Leave a Reply

Your email address will not be published. Required fields are marked *