Most non-trivial web applications are going to be backed by a database, so let’s see how to do that with one of Java’s most popular Object to Relational Mapping (ORM) tools, Hibernate.
Fundamentally, Hibernate is a simple concept. You have Java classes and you have database tables that map to those classes. Hibernate provides a means for mapping classes to tables.
There are many ways to stitch persistence together with Hibernate. The Address Book application takes a three-step approach:
i. Configure Hibernate
ii. Create a Hibernate mapping file
iii. Implement Database Create/Read/Update/Delete (CRUD) Operations
We’ve got to tell Hibernate about our database, ...