Google News
logo
Java Spring Boot - Interview Questions
What Is the Difference Between Hibernate and Spring Data JPA?
Hibernate is a JPA (Java Persistence API) implementation providing ORM (Object-relational mapping) for mapping, storing, updating and retrieving application data from relational databases to Java objects and vice versa. Hibernate maps Java classes to database tables and from Java data types to SQL data types, hence programmer is relieved from writing traditional data persistence programs like SQL.
 
Whereas Spring Data JPA is a JPA Data Access Abstraction used to significantly reduce the amount of boilerplate code required to implement data access layers for various persistence stores. With Spring Data, we still need to use Hibernate, Eclipse Link, or any other JPA provider. One of the key benefits is that we can control transaction boundaries with the use of @Transactional annotation.
Advertisement