JPA - Architecture
JPA - Architecture
The following table describes each of the units shown in the above architecture.
Units Description
https://www.tutorialspoint.com/jpa/jpa_architecture.htm 18/09/24, 11 34 PM
Page 1 of 3
:
EntityManagerFactory and manages multiple EntityManager instances.
The above classes and interfaces are used for storing entities into a database as
a record. They help programmers by reducing their efforts to write codes for
storing data into a database so that they can concentrate on more important
activities such as writing codes for mapping the classes with database tables.
https://www.tutorialspoint.com/jpa/jpa_architecture.htm 18/09/24, 11 34 PM
Page 2 of 3
:
The relationship between EntityManagerFactory and EntityManager is
one-to-many. It is a factory class to EntityManager instances.
The relationship between EntityManager and EntityTransaction is one-to-
one. For each EntityManager operation, there is an EntityTransaction
instance.
The relationship between EntityManager and Query is one-to-many.
Many number of queries can execute using one EntityManager instance.
The relationship between EntityManager and Entity is one-to-many. One
EntityManager instance can manage multiple Entities.
https://www.tutorialspoint.com/jpa/jpa_architecture.htm 18/09/24, 11 34 PM
Page 3 of 3
: