Alternatives to MyBatis logo

Alternatives to MyBatis

Hibernate, Flyway, Spring Data, jOOQ, and Entity Framework are the most popular alternatives and competitors to MyBatis.
156
142
+ 1
17

What is MyBatis and what are its top alternatives?

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.
MyBatis is a tool in the Object Relational Mapper (ORM) category of a tech stack.
MyBatis is an open source tool with 17.2K GitHub stars and 11.6K GitHub forks. Here’s a link to MyBatis's open source repository on GitHub

Top Alternatives to MyBatis

  • Hibernate
    Hibernate

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

  • Flyway
    Flyway

    It lets you regain control of your database migrations with pleasure and plain sql. Solves only one problem and solves it well. It migrates your database, so you don't have to worry about it anymore. ...

  • Spring Data
    Spring Data

    It makes it easy to use data access technologies, relational and non-relational databases, map-reduce frameworks, and cloud-based data services. This is an umbrella project which contains many subprojects that are specific to a given database. ...

  • jOOQ
    jOOQ

    It implements the active record pattern. Its purpose is to be both relational and object oriented by providing a domain-specific language to construct queries from classes generated from a database schema. ...

  • Entity Framework
    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. ...

  • guava
    guava

    The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth. ...

  • Sequelize
    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. ...

  • Java 8
    Java 8

    It is a revolutionary release of the world’s no 1 development platform. It includes a huge upgrade to the Java programming model and a coordinated evolution of the JVM, Java language, and libraries. Java 8 includes features for productivity, ease of use, improved polyglot programming, security and improved performance. ...

MyBatis alternatives & related posts

Hibernate logo

Hibernate

1.3K
994
25
Idiomatic persistence for Java and relational databases.
1.3K
994
+ 1
25
PROS OF HIBERNATE
  • 17
    Easy ORM
  • 7
    Easy transaction definition
  • 1
    Is integrated with spring jpa
CONS OF HIBERNATE
  • 3
    Can't control proxy associations when entity graph used

related Hibernate posts

Flyway logo

Flyway

243
481
30
Version control for your database
243
481
+ 1
30
PROS OF FLYWAY
  • 12
    Superb tool, easy to configure and use
  • 9
    Very easy to config, great support on plain sql scripts
  • 5
    Is fantastic and easy to install even with complex DB
  • 4
    Simple and intuitive
CONS OF FLYWAY
  • 3
    "Undo Migrations" requires pro version, very expensive

related Flyway posts

Miguel Suarez

Flyway vs Liquibase #Migration #Backwards-compatible

We were looking for a tool to help us integrating the migration scripts as part of our Deployment. At first sight both tools look very alike, are well integrated with Spring, have a fairly frequent development activity and short release cycles.

Liquibase puts a lot of emphasis on independence with the DB, allowing you to create the scripts on formats like JSON and YML, abstracting away from SQL, which it's also supported. Since we only work with one DB type across services we wouldn't take much advantage of this feature.

Flyway on the other hand has the advantage on being actively working on the integration with PostgreSQL 11, for it's upcoming version 6. Provides a more extensive set of properties that allow us to define what's allowed on what's not on each different environment.

Instead of looking for a tool that will allow us to rollback our DB changes automatically, we decided to implement backwards-compatible DB changes, for example adding a new column instead of renaming an existing one, postponing the deletion of the deprecated column until the release has been successfully installed.

See more
Shared insights
on
FlywayFlywayLiquibaseLiquibase

All the DB deployments in our current organization are manual. We want to automate them. We are leaning toward Liquibase since it has versioning and rollbacks. Is Flyway better or Liquibase?

See more
Spring Data logo

Spring Data

521
341
0
Provides a consistent approach to data access – relational, non-relational, map-reduce, and beyond
521
341
+ 1
0
PROS OF SPRING DATA
    Be the first to leave a pro
    CONS OF SPRING DATA
      Be the first to leave a con

      related Spring Data posts

      Остап Комплікевич

      I need some advice to choose an engine for generation web pages from the Spring Boot app. Which technology is the best solution today? 1) JSP + JSTL 2) Apache FreeMarker 3) Thymeleaf Or you can suggest even other perspective tools. I am using Spring Boot, Spring Web, Spring Data, Spring Security, PostgreSQL, Apache Tomcat in my project. I have already tried to generate pages using jsp, jstl, and it went well. However, I had huge problems via carrying already created static pages, to jsp format, because of syntax. Thanks.

      See more
      jOOQ logo

      jOOQ

      78
      70
      2
      A light database-mapping software library
      78
      70
      + 1
      2
      PROS OF JOOQ
      • 1
        VAADIN
      • 1
        Easy dsl
      CONS OF JOOQ
        Be the first to leave a con

        related jOOQ posts

        Entity Framework logo

        Entity Framework

        811
        153
        8
        An object-relational mapper that enables .NET developers to work with relational data
        811
        153
        + 1
        8
        PROS OF ENTITY FRAMEWORK
        • 1
          Code first approach
        • 1
          LINQ
        • 1
          Multiple approach (Model/Database/Code) first
        • 1
          Strongly Object-Oriented
        • 1
          Object Oriented
        • 1
          Model first approach
        • 1
          Auto generated code
        • 1
          Strongly typed entities
        • 0
          Database first
        CONS OF ENTITY FRAMEWORK
          Be the first to leave a con

          related Entity Framework posts

          guava logo

          guava

          740
          170
          6
          Google Core Libraries for Java 6+
          740
          170
          + 1
          6
          PROS OF GUAVA
          • 5
            Interface Driven API
          • 1
            Easy to setup
          CONS OF GUAVA
            Be the first to leave a con

            related guava posts

            Sequelize logo

            Sequelize

            694
            1.2K
            122
            Easy-to-use multi SQL dialect ORM for Node.js
            694
            1.2K
            + 1
            122
            PROS OF SEQUELIZE
            • 35
              Good ORM for node.js
            • 26
              Easy setup
            • 16
              Support MySQL & MariaDB, PostgreSQL, MSSQL, Sqlite
            • 13
              Open source
            • 12
              Free
            • 10
              Promise Based
            • 3
              Recommend for mongoose users
            • 3
              Atrocious documentation, buggy, issues closed by bots
            • 2
              Typescript
            • 2
              Newest Sequelize on 2022 was better at documentation
            CONS OF SEQUELIZE
            • 28
              Docs are awful
            • 7
              Relations can be confusing

            related Sequelize posts

            Dieudonné ALLOGNON
            Junior Fullstack Developer · | 5 upvotes · 103.5K views

            Hey! I am actually in internship and have an app to create for my structure. It will be an intern app which will allow crud dashboard actions with some data provided by the use of an API of one of the structure partner and make a correspondence to data contained in a private database. Since it's an intern app, I thought about Electron for a desktop app because I did a lot of web with Laravel and the structure goes more for the desktop app. But it will be my first occasion working with this tech.

            Is Electron a good choice? Wich ORM should be more complete and adapted to this between Sequelize and TypeORM? (Database will be MySQL) Some charts will be displayed in the app. Is there a library (preferably without jQuery) that suits this stack?

            Thank you !

            See more

            What is the best way to increase your income as a freelancer in 2019? What frameworks should be the best to learn? React Node.js Docker Kubernetes Sequelize Mongoose MongoDB ExpressJS hapi Based on trends I've picked up a JS full stack. If you need to work under startups you may replace React with Vue.js . If you want to work in outsourcing Angular 2+ may be better.

            What is your opinion?

            See more
            Java 8 logo

            Java 8

            650
            572
            0
            A development environment for building applications
            650
            572
            + 1
            0
            PROS OF JAVA 8
              Be the first to leave a pro
              CONS OF JAVA 8
                Be the first to leave a con

                related Java 8 posts