Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Hibernate

1.5K
1.2K
+ 1
34
Java Persistence API

127
96
+ 1
0
Add tool

Hibernate vs Java Persistence API: What are the differences?

Developers describe Hibernate as "Idiomatic persistence for Java and relational databases". Hibernate is a suite of open source projects around domain models. The flagship project is Hibernate ORM, the Object Relational Mapper. On the other hand, Java Persistence API is detailed as "*A Java application programming interface specification *". It is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition.It provides a POJO persistence model for object-relational mapping.

Hibernate can be classified as a tool in the "Object Relational Mapper (ORM)" category, while Java Persistence API is grouped under "Mapping APIs".

Bodybuilding.com, StyleShare Inc., and Zola are some of the popular companies that use Hibernate, whereas Java Persistence API is used by StyleShare Inc., Kwery, and engel80. Hibernate has a broader approval, being mentioned in 87 company stacks & 74 developers stacks; compared to Java Persistence API, which is listed in 6 company stacks and 4 developer stacks.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Hibernate
Pros of Java Persistence API
  • 22
    Easy ORM
  • 8
    Easy transaction definition
  • 3
    Is integrated with spring jpa
  • 1
    Open Source
    Be the first to leave a pro

    Sign up to add or upvote prosMake informed product decisions

    Cons of Hibernate
    Cons of Java Persistence API
    • 3
      Can't control proxy associations when entity graph used
      Be the first to leave a con

      Sign up to add or upvote consMake informed product decisions

      What is Hibernate?

      Hibernate is a suite of open source projects around domain models. The flagship project is Hibernate ORM, the Object Relational Mapper.

      What is Java Persistence API?

      It is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition.It provides a POJO persistence model for object-relational mapping.

      Need advice about which tool to choose?Ask the StackShare community!

      What companies use Hibernate?
      What companies use Java Persistence API?
      Manage your open source components, licenses, and vulnerabilities
      Learn More

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with Hibernate?
      What tools integrate with Java Persistence API?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      What are some alternatives to Hibernate and Java Persistence API?
      MyBatis
      It is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings. It eliminates almost all of the JDBC code and manual setting of parameters and retrieval of results. It can use simple XML or Annotations for configuration and map primitives, Map interfaces and Java POJOs (Plain Old Java Objects) to database records.
      Spring
      A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.
      MySQL
      The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
      PostgreSQL
      PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
      MongoDB
      MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
      See all alternatives