Spring Boot JPA Tutorial
Spring Boot JPA Useful Resources
Selected Reading
- Spring Boot JPA - Native Query
- Spring Boot JPA - Custom Query
- Spring Boot JPA - Named Query
- Spring Boot JPA - Custom Methods
- Spring Boot JPA - Methods
- Spring Boot JPA - Unit Test Repository
- Spring Boot JPA - Application Setup
- Spring Boot JPA vs Hibernate
- Spring Boot JPA - Architecture
- Spring Boot JPA - Environment Setup
- Spring Boot JPA - Overview
- Spring Boot JPA - Home
Spring Boot JPA Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Spring Boot JPA vs Hibernate
Spring Boot JPA vs Hibernate
JPA
JPA is a specification which specifies how to access, manage and persist information/data between java objects and relational databases. It provides a standard approach for ORM, Object Relational Mapping.
Hibernate
Hibernate is an implementation of JPA. It provides a pghtweight framework and is one of the most popular ORM tool used.
JPA Vs Hibernate
Following table summerises the differences between JPA and Hibernate.
Category | JPA | Hibernate |
---|---|---|
Type | JPA is a specification and defines the way to manage relational database data using java objects. | Hibernate is an implementation of JPA. It is an ORM tool to persist java objects into the relational databases. |
Package | JPA uses javax.persistence package. | Hibernate uses org.hibernate package. |
Factory | JPA uses EntityManagerFactory interface to get the entity manager to persist objects. | Hibernate uses SessionFactory interface to create session object which is then used to persist objects. |
CRUD Operations | JPA uses EntityManager interface to create/read/delete operation and maintains the persistence context. | Hibernate uses Session interface to create/read/delete operation and maintains the persistence context. |
Language | JPA uses JPQL (Java Persistence Query Language) as Object Oriented Query language for database operations. | Hibernate uses HQL (Hibernate Query Language) as Object Oriented Query language for database operations. |