Alternatives to MyBatis logo

Alternatives to MyBatis

Hibernate, Flyway, Spring Data, jOOQ, and Java 8 are the most popular alternatives and competitors to MyBatis.
165
164
+ 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 18.5K GitHub stars and 12.3K 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. ...

  • SQLAlchemy
    SQLAlchemy

    SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. ...

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

MyBatis alternatives & related posts

Hibernate logo

Hibernate

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

related Hibernate posts

Flyway logo

Flyway

265
529
33
Version control for your database
265
529
+ 1
33
PROS OF FLYWAY
  • 13
    Superb tool, easy to configure and use
  • 9
    Very easy to config, great support on plain sql scripts
  • 6
    Is fantastic and easy to install even with complex DB
  • 4
    Simple and intuitive
  • 1
    Easy tool to implement incremental migration
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

748
386
0
Provides a consistent approach to data access – relational, non-relational, map-reduce, and beyond
748
386
+ 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

      109
      89
      1
      A light database-mapping software library
      109
      89
      + 1
      1
      PROS OF JOOQ
      • 1
        Easy dsl
      CONS OF JOOQ
        Be the first to leave a con

        related jOOQ posts

        Entity Framework logo

        Entity Framework

        1.7K
        214
        18
        An object-relational mapper that enables .NET developers to work with relational data
        1.7K
        214
        + 1
        18
        PROS OF ENTITY FRAMEWORK
        • 5
          LINQ
        • 3
          Object Oriented
        • 3
          Strongly Object-Oriented
        • 2
          Multiple approach (Model/Database/Code) first
        • 2
          Code first approach
        • 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

          1.3K
          182
          6
          Google Core Libraries for Java 6+
          1.3K
          182
          + 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

            SQLAlchemy logo

            SQLAlchemy

            929
            468
            7
            The Python SQL Toolkit and Object Relational Mapper
            929
            468
            + 1
            7
            PROS OF SQLALCHEMY
            • 7
              Open Source
            CONS OF SQLALCHEMY
            • 2
              Documentation

            related SQLAlchemy posts

            Django Stars
            Developer at Django Stars · | 3 upvotes · 138.3K views

            Merging Django ORM with SQLAlchemy for Easier Data Analysis (Video Inside)

            Development of products with Django framework is usually easy and straightforward; great documentation, many tools out of the box, plenty of open source libraries and big community. Django ORM takes full control about SQL layer protecting you from mistakes, and underlying details of queries so you can spend more time on designing and building your application structure in Python code. However, sometimes such behavior may hurt - for example, when you’re building a project related to data analysis. Building advanced queries with Django is not very easy; it’s hard to read (in Python) and hard to understand what’s going on in SQL-level without logging or printing generated SQL queries somewhere. Moreover, such queries could not be efficient enough, so this will hit you back when you load more data into DB to play with. In one moment, you can find yourself doing too much raw SQL through Django cursor, and this is the moment when you should do a break and take a look on another interesting tool, which is placed right between ORM layer and the layer of raw SQL queries.

            See more
            Sequelize logo

            Sequelize

            807
            1.4K
            136
            Easy-to-use multi SQL dialect ORM for Node.js
            807
            1.4K
            + 1
            136
            PROS OF SEQUELIZE
            • 40
              Good ORM for node.js
            • 30
              Easy setup
            • 19
              Support MySQL & MariaDB, PostgreSQL, MSSQL, Sqlite
            • 14
              Open source
            • 13
              Free
            • 11
              Promise Based
            • 4
              Recommend for mongoose users
            • 3
              Atrocious documentation, buggy, issues closed by bots
            • 2
              Typescript
            CONS OF SEQUELIZE
            • 30
              Docs are awful
            • 9
              Relations can be confusing

            related Sequelize posts

            Dieudonné ALLOGNON
            Junior Fullstack Developer · | 5 upvotes · 213.7K 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
            Vyshnav KPI
            Application Developer at KPI suite tech · | 4 upvotes · 16.5K views
            Shared insights
            on
            SequelizeSequelizePrismaPrisma

            Can you help me with the following:

            1. What additional functionality is present in Prisma when compared with Sequelize?
            2. Is getter and setter method available in Prisma? If then please provide any reference or resource.
            3. Is Hooks, hierarchy present in Prisma?
            See more