First and foremost, let's try to understand what Hibernate is and why it is worth using. Hibernate is most popularly known as an Object/Relational Mapping framework. It was devised back in the year 2001 by Gavin King, while working with Cirrus technologies, as an alternative to the Enterprise JavaBeans (EJB) style of persistence to provide better persistence capabilities to Java applications. The project details can be accessed on its homepage, http://www.hibernate.org. Initially started as an ORM framework, Hibernate has spun off into many projects, such as Hibernate Search, Hibernate Validator, Hibernate OGM (for NoSQL databases), and so on. In this chapter, you will learn about the Hibernate ORM framework (http://hibernate.org/orm/).
Before getting into the details of Hibernate, let's understand why it is good to use an...