The data access layer is the most fundamental part of any enterprise application. A common problem arises when dealing with a relational database from an object-oriented system—all runtime data are represented as objects, where the real data is stored as rows in tables. The Java Persistence API (JPA) provides Java developers with all the required operations, mappings, and techniques for mapping objects to the relational database.
In Chapter 3, Accessing the Database with JPA 2.1, we'll learn how to create and use JPA entities and map them to tables and columns. Moreover, we'll learn how to perform the four CRUD operations: mapping entity relationships, using the JPA Query Language and the Criteria API, and mapping inheritance relationships.