What is the relationship between JPA and ORM?

6

I wanted to know the relationship between JPA and ORM because I was in doubt, if both, deal with the same subject.

    
asked by anonymous 30.11.2015 / 22:07

2 answers

6

Summary: JPA is a specification and ORM is the tool (Hibernate, Entity, etc.).

In the context of Java applications, to facilitate the process of transforming data between applications and databases, we can use some persistence tools such as Hibernate or EclipseLink .

These tools function as intermediaries between applications and databases, automating a number of important processes related to data persistence. These are called Object Relational Mapping (ORM) tools.

In order to facilitate the use of these tools and make them compatible with the other features of the Java platform, they are standardized by the Java Persistence API (JPA) specification.

Source: Java Apostille - Persistence with JPA 2 and Hibernate

    
30.11.2015 / 22:23
6
The Java Persistence API (JPA) is a specification of how Object-Relational Mapping (ORM - Object-Relational Mapping ) should be implemented on the JavaEE platform.

Therefore:

  • ORM is a general concept
  • JPA defines an ORM pattern, ie how this should work in Java in practice
  • Hibernate, EclipseLink, Toplink, OpenJPA are implementations of the JPA standard
01.12.2015 / 00:53