Hibernate Mappings

Hibernate Mappings

In Enterprise Applications, we are able to use the data models like Object Oriented Data Model, Relational Data Model, etc. In general, Front-End applications are able to use Object Oriented Data Model to represent data and Back-End Systems are able to use Relational Data Model to represent data.

In the above context, both Object Oriented Data Model and relational Data model are having their own conventions to represent data, these different conventions will create mismatches between data models, it will reduce data persistency in enterprise applications.

In the above context, to improve data persistency in enterprise applications we have to solve the mismatches between data models, for those we have to use ORM implementations.

Hibernate is one of the ORM implementation, it has provided “Hibernate Mappings” feature to resolve mismatches between data models. To resolve mismatches between data models, Hibernate has provided the following mappings.

There are 4 different Types of Mappings

  • Basic OR Mapping.
  • Component Mapping
  • Inheritance Mapping
  • Association Mapping
1. Basic OR Mapping

It is normal mapping between a class, an ID property, a normal property from Object Oriented data model and a table, a primary key column and normal columns.

Hibernate Mappings


Scroll to top