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

'Spring' 카테고리의 다른 글

Spring Boot Exception Handling  (0) 2023.09.14
DTO (Data Transfer Object)  (0) 2023.09.14
Spring Data JPA Repository  (0) 2023.09.01
Spring Data JPA Entity  (0) 2023.09.01
Spring vs Spring Boot  (0) 2023.08.30

+ Recent posts