Integrating with a relational database using an ORM (Hibernate) framework
An ORM framework enables you to store, query, or manipulate data using the object-oriented paradigm. It provides an object-oriented approach to access the data from the database or, in other words, instead of using SQL, you can use Java objects to interact with the database.
In Java, as a standard specification, the Java Persistence API (JPA) specifies the following:
- Which Java objects ought to be persisted
- How these objects should be persisted
JPA is not a framework or tool but it dictates the standard protocol and covers the core concepts of what to persist and how to persist. Various implementing frameworks such as Hibernate and EclipseLink have adopted these JPA standards. We will be using Hibernate as our ORM framework.
To get hands-on with Hibernate in the Micronaut framework, we will work on the small pet-clinic
application and, specifically for Hibernate, we will focus on the...