In this new series, I will be talking about the Java Persistence API (JPA). Hibernate will be the JPA provider that i will be using. If that statement doesn't make sense to you, it will become clear shortly.

What is JPA ?

The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database.

You might be thinking can't we do that already with JDBC ? The answer is Yes. You can build a fully functional application that uses a relational database without ever using JPA. At a basic level there is nothing that can be done with JPA that you can't do with JDBC.

Why use JPA ?

The answer lies in the fact that writing JDBC code is cumbersome, and as the complexity of the application grows it becomes a challenge in itself. Don't worry if you aren't convinced yet, you will soon be.

Let's get started with the Persistence Unit