Hibernate: A Full Object Relational Mapping Service

Hibernate: A Full Object Relational Mapping Service

Allan M. Hart (Minnesota State University, Mankato, USA)
DOI: 10.4018/978-1-59904-887-1.ch025
OnDemand PDF Download:


This chapter presents a brief overview of the object/relational mapping service known as Hibernate. Based on work provided in the book Java Persistence with Hibernate, it is argued that the paradigm mismatch problem consists of five problems: the problem of granularity, the problem of subtypes, the problem of identity, the problem of associations, and the problem of data navigation. It is argued that Hibernate, if it is to be considered a successful object/relational mapping service, must solve the paradigm mismatch problem and, hence, each of the five problems noted above. A simplified version of an order entry system is presented together with the mapping files required to store persistent objects to a database. Examples are given for one-to-one, one-to-many, and many-to-many mappings. The distinction between value and entity types is explained and the mapping technique required for value types is introduced into the order entry system application. The n+1 selects problem is explained and a strategy for solving that problem using Hibernate’s support for lazy, batch, and eager fetching strategies is discussed.

Complete Chapter List

Search this Book: