JPA

What is JPA?

What is JPA?

Java Persistence API is a class and method collection for storing large volumes of data into a database administered by the Oracle Corporation.

Where to use JPA?

A programmer follows the framework JPA Provider, which provides easy interaction with database instances to lessen the strain of writing codes for relational object maintenance. JPA is here to take over the necessary framework.

What are the advantages of JPA?

The advantages of JPA are given below.

  • The burden of intercommunication with the database decreases substantially using JPA.
  • User programming is made easy by disguising the O/R mapping and processing of database access.
  • By employing annotations, the cost of generating a definition file is reduced.
  • We can integrate apps with other JPA providers.
  • The standard implementation features that can be part of JPA's specification can be added using multiple implementations.

Disadvantages of JPA

 Below are the problems that occur in JPA are:

  • Composite Key is the biggest problem of the JPA developers. When we map a composite key, we add huge complexity to the project.
  •  When we need to use stored procedures or Functions, a project with many business rules in the database can be challenging.
  • Slow processing and a lot of RAM is occupied.
  • Sometimes, JPA degrades its performance during reporting, including many entities or issues with a transaction.