With object-oriented programming languages, Object Relational Mapping (ORM) frameworks such as Hibernate have gained popularity due to their ease of use and portability to different relational database management systems.Hibernate implements the Java Persistent API, JPA, and frees a developer from authoring software to address the impedance mismatch between objects and relations. In this paper, we evaluate the performance of Hibernate by comparing it with a native JDBC implementation using a benchmark named BG. BG rates the performance of a system for processing interactive social networking actions such as view profile, extend an invitation from one member to another, and other actions. Our key findings are as follows. First, an object-oriented Hibernate implementation of each action issues more SQL queries than its JDBC counterpart. This enables the JDBC implementation to provide response times that are significantly faster. Second, one may use the Hibernate Query Language (HQL) to refine the object-oriented Hibernate implementation to provide performance that approximates the JDBC implementation.
A IntroductionHibernate [9] is an object-relational mapping (ORM) framework for the Java programming language. It supports three key features. First, given the persistent class definitions of an application, it generates its relational database schema.Second, it populates instances of a persistent class by issuing SQL queries to the underlying relational database management system (RDBMS) transparently. A persistence class has a primary key and each of its instances correspond to a row of a table in the RDBMS. Third, Hibernate propagates an application's changes 1 to the underlying database * In Proceedings of the 16th ACM International Conference on Information Integration and Web-based Applications and Services, Hanoi, Vietnam, December 2014.1 A change to a persistent instance might be an update to one or more of its property values, deletion or creation of an instance.