Get Advice Icon

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

Hibernate
Hibernate

629
432
+ 1
16
MyBatis
MyBatis

32
15
+ 1
0
Add tool

Hibernate vs MyBatis: 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, MyBatis is detailed as "SQL Mapper Framework for Java". 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.

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

MyBatis is an open source tool with 11.2K GitHub stars and 7.07K GitHub forks. Here's a link to MyBatis's open source repository on GitHub.

- No public GitHub repository available -

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 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.
Get Advice Icon

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

Why do developers choose Hibernate?
Why do developers choose MyBatis?
    Be the first to leave a pro
      Be the first to leave a con
        Be the first to leave a con
        What companies use Hibernate?
        What companies use MyBatis?

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

        What tools integrate with Hibernate?
        What tools integrate with MyBatis?
          No integrations found

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

          What are some alternatives to Hibernate and MyBatis?
          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.
          Sequelize
          Sequelize is a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL and features solid transaction support, relations, read replication and more.
          SQLAlchemy
          SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
          Doctrine 2
          Doctrine 2 sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL.
          Entity Framework
          It is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write.
          See all alternatives
          Decisions about Hibernate and MyBatis
          No stack decisions found
          Interest over time
          Reviews of Hibernate and MyBatis
          No reviews found
          How developers use Hibernate and MyBatis
          Avatar of Kang Hyeon Ku
          Kang Hyeon Ku uses HibernateHibernate

          Mybatis 로 쿼리를 만들고 조건분 분기식 for 문을 쿼리에 달아 더이상 쿼리를 알아 볼 수 없게 되었을때 이게 의마가 있나 싶었다. 그 때 한번 orm 을 써보면 어떨까 싶어 최근에 배우기 시작한 orm 이다. 정말 편하게 개발을 할 수 있는데 일조하고 있다. 다만 결국에 쿼리를 날려 맵핑을 하는데, 쿼리를 잘 모르거나 그에 대한 지식 없이 쓰다가는 망하겠구나 하는 생각이 많이 들었다.

          Avatar of Analytical Informatics
          Analytical Informatics uses HibernateHibernate

          We use a Clojure-powered wrapper around Hibernate to provide an ORM access to our data store for applications, as well as offering SSO integration and HIPAA logging functionality.

          Avatar of Tongliang Liu
          Tongliang Liu uses HibernateHibernate

          Can't escape from when you're on the Java stack and deal with relational db.

          Avatar of Satoru Ishikawa
          Satoru Ishikawa uses HibernateHibernate

          Strut や Spring など Java web app flame work での Object Relation Mapperとして

          Avatar of icarus-dave
          icarus-dave uses HibernateHibernate

          Persistence layer for backend data; maps entities to the database.

          How much does Hibernate cost?
          How much does MyBatis cost?
          Pricing unavailable
          Pricing unavailable
          News about MyBatis
          More news