Introducing Hibernate
(Page 1 of 4 )
Databases are complex to implement. This is especially true when components of a database based on two different approaches (i.e. object oriented vs. relational) must interact with each other. Object Relational Mapping (ORM) frameworks can act as mediators between the two approaches. Hibernate, the topic of this article, is an ORM framework for Java.
Reinventing the wheel is the bane of software development. This is true for each and every component of software. One of the basic and most complex (in terms of design and implementation) component is the database. The complexity increases when the "orientation" of the interacting components differs.
To make a long story short, when a component based on one kind of approach (e.g. object oriented) tries to interact directly with another object having its roots in another kind of approach (e.g. relational), the complexity increases due to the knots and knaves of cross approach communication. This is evident in all the database APIs provided by different languages.
The best example of this is the Java Database Connectivity (JDBC) API. Though JDBC provides an easy method for accessing different databases without much ado, it is basically a low level API providing only a thin layer of abstraction. This is sufficient for small and medium projects, but is not well suited for enterprise level applications. What is required is a Framework that can act as a mediator between both parties (i.e. approaches).
Object Relational Mapping (ORM) frameworks are such mediators. The best example of an ORM framework for Java is Hibernate. In this tutorial I will be introducing the Hibernate framework by discussing the basics of Hibernate. The first section will cover the basic concept of ORM. The second section will focus on getting started with Hibernate, and the third segment will pull all of the details together with a real world example.
Next: Object Relational Mapping: What is it? >>
More Java Articles
More By A.P.Rajshekhar