JPA

Mismatches between relational and object models

Mismatches between relational and object models

Relational objects are displayed in a tabular form, while object models are displayed in a relational object format graph. The following reasons cause certain discrepancies when storing and retrieving an object model from a related database:

  • Granularity: The object model has more granularity than the relational model.
  • Subtypes: Subtypes means inheritance, is not backed by all kinds of relational databases.
  • Identity: Like the object model, the relational model does not disclose identity while writing equations.
  • Associations: Relational models cannot determine multiple relationships while looking into an object domain model.
  • Data navigation: Data navigation in both models differs between objects in an object network.

In 2006, JPA 1.0 was released as part of the EJB 3.0 specification. This was the initial version of the Java Persistence API.

The other development versions published in JPA specification are as follows:

JPA 2.0-

In the latter part of 2009, this version was released. The key features of this version are as follows: - 

  • Validation is supported.
  • It increases object-relational mapping functionality.
  • It shares the object of cache support.

JPA 2.1-

In 2013, the JPA 2.1 was introduced with the following characteristics: - 

  • It facilitates object fetching.
  • It supports updating/deleting criteria.
  • The schema is generated.

JPA 2.2-

In 2017, JPA 2.2 was launched as the maintenance development. Some of its main characteristics are:

  • Java 8 Date and Time are supported.
  • It provides @Repeatable annotation that may be used for a declaration or type use when applying the same annotations.
  • It permits the application of JPA annotation in meta-annotations.
  • It allows the user to broadcast the results of a query.