Hibernate vs Spring
Data JPA
By Ramesh Fadatare (Java Guides)
Hibernate vs Spring Data JPA
Hibernate is a java based ORM tool that provides a framework for mapping application
domain objects to the relational database tables and vice versa.
Spring Data JPA is an abstraction layer on top of JPA to Reduce the amount of boilerplate code
required to implement data access object (DAO) layer.
Hibernate is a JPA provider ( JPA speci cation implementation). Spring Data JPA is not a JPA
provider. It simply "hides" the Java Persistence API (and the JPA provider) behind its
repository abstraction
Spring Data JPA uses Hibernate as a default JPA provider
Spring Data JPA cannot work without a JPA provider.
.
fi
.
Hibernate vs Spring Data JPA
Spring Data JPA is an abstraction layer on top of
Spring Data JPA JPA to Reduce the amount of boilerplate code
required to implement data access object (DAO)
JPA is just a speci cation that facilitates object-
JPA relational mapping to manage relational data in
Java applications
Hibernate Hibernate is a JPA Implementation
JDBC
Hibernate generates SQL query and
executes using JDBC
fi