0% found this document useful (0 votes)
16 views2 pages

Lesson 1

Object Relational Mapping (ORM) is a programming technique that maps application domain model objects to relational database tables, with JPA (Jakarta Persistence API) facilitating this in Java applications. Hibernate is a popular Java-based ORM tool that provides a framework for mapping objects to database tables and generates SQL statements, acting as a layer on top of JDBC. Spring Data JPA is an abstraction layer that simplifies the implementation of data access objects using JPA, with Hibernate as its default provider.

Uploaded by

ericcostermboya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Lesson 1

Object Relational Mapping (ORM) is a programming technique that maps application domain model objects to relational database tables, with JPA (Jakarta Persistence API) facilitating this in Java applications. Hibernate is a popular Java-based ORM tool that provides a framework for mapping objects to database tables and generates SQL statements, acting as a layer on top of JDBC. Spring Data JPA is an abstraction layer that simplifies the implementation of data access objects using JPA, with Hibernate as its default provider.

Uploaded by

ericcostermboya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

OBJECT RELATIONAL MAPPING (ORM)

Object Relational Mapping (ORM): Is the programming technique to map application domain
model objects to the relational database tables (object fields to table columns).
In Java, JPA facilitates Object Relational Mapping.


JPA (Jakarta Persistence API): formerly known as Java Persistence API, is a specification
that facilitates object relational mapping to manage relational data in Java applications.
It provides platform to work directly with objects instead of using SQL Statements.
Name was changed by the Eclipse Foundation when took the library.

Popular implementations of JPA are as follows:
(i)Hibernate
(ii)EclipseLink
(iii)TopLink
(iv)MyBatis
JPA is just standard specifications.
Hibernate Object Relational Mapping (ORM) Framework
Hibernate is a java based ORM tool that provides a framework for mapping application domain
objects to the relational database tables and vice versa.
Is the framework for persisting/saving Java Objects in a database.
Official Website for Hibernate: hibernate.org

Hibernate provides JPA Implementation that maps your database records to Java Objects and
generate required SQL Statements to replicate all operations to the database.

Hibernate internally uses JDBC for all database communications, it uses JDBC to interact with
database.

Hibernate acts as an additional layer on top of JDBC and enables you to implement a database -
independent persistence layer.
Benefits of Hibernate:
Hibernate handles all the low-level SQL Query by minimizing the amount of JDBC code you
have to write.
Hibernate provides ORM (Object to Relational Mapping)


Hibernate vs Spring Data JPA
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 Specification 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 can not work without JPA Provider

You might also like