What's the difference between JPA and Hibernate?

Java Persistence API (JPA) is a specification for object-relational mapping (ORM) in Java. It defines a set of standards for the persistence of Java objects to a relational database, and provides a runtime interface for accessing and managing the persisted data.

Hibernate is a popular open-source ORM framework that implements the JPA specification. It provides a set of libraries and tools for mapping Java objects to a relational database, and for performing database operations using Java objects.

In other words, JPA is a specification that defines how ORM should work in Java, while Hibernate is a concrete implementation of this specification.

While JPA defines the standard APIs for ORM in Java, Hibernate goes beyond the specification and provides additional features and functionality for working with data. These features include support for caching, lazy loading, and advanced query capabilities, among others.

Therefore, if you are using JPA in your Java application, you can choose to use Hibernate as your ORM provider, or you can use another JPA implementation such as EclipseLink or DataNucleus.