ORM (Object Relational Mapping)
- Map application domain model objects (like Java objects) to relational database tables
JPA (Java Persistence API - or Jakarta Persistence API)
- The standard interface for using ORM in Java
- Provides a mechanism for managing persistence and ORM and functions
- Defines the ORM internally in Java rather than relying on vendor-specific mapping implementations (No need to write SQL queries)
- Some implementations of JPA : Hibernate, Spring JPA, etc
Hiberante ORM Framework
- Hibernate is a JPA implementation which is used to map application domain objects to relational database tables and vice versa
- Hibernate generates SQL query and executes using JDBC (Hibernate acts as an additional layer on top of JDBC)
Spring Data JPA
- ease the implementation of JPA-based repositories
- simply hides the JPA (abstraction layer on top of JPA)
- JpaRepository interface methods are on top of JPA EntityManager interface, which will then connect to the database
- Spring Boot Starter Data JPA needs a JPA provide (implementation) for default, Hibernate is used
javaguides.net
- Basic flow of entity in Spring Data JPA
javaguides.net