# mybatis/mybatis-3

MyBatis SQL mapper framework for Java

Repository: https://github.com/mybatis/mybatis-3
Canonical: https://ross.abutalabs.com/products/mybatis-3
Homepage: http://mybatis.github.io/mybatis-3/
Language: Java
License: Apache-2.0
License Family: permissive
Topics: sql, mybatis, java
Last push: 2026-08-26T15:13:01+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 40, longevity 100
- inputs: {"age_days": 4948, "days_push": 7, "days_rel": 608, "gap_med": 18.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 20439, forks 12867 (observed 2026-08-28T04:11:30.131217+00:00)

## What it is
MyBatis is a first-class SQL mapping persistence framework for Java that couples objects with SQL statements or stored procedures via XML descriptors or annotations. It eliminates most JDBC boilerplate while keeping full control over the SQL, offering a simpler alternative to full ORM tools.

## Use cases
- map Java POJOs to database records with custom SQL
- eliminate JDBC boilerplate for parameter setting and result retrieval
- call stored procedures from a Java application
- configure SQL mappings with XML or annotations
- manage database transactions and connections via SqlSessionFactory
- use a lightweight alternative to Hibernate for SQL-centric apps

## When to choose
- you want full control over the SQL your application runs
- you need to map existing stored procedures to Java objects
- you find full ORM tools too heavy or magical for your data model
- you are building a Java or JVM backend that talks to a relational database

## When to avoid
- you want automatic schema generation or full object-relational mapping without writing SQL
- you prefer query APIs like JPA Criteria or jOOQ over hand-written SQL
- you are not working on the JVM/Java platform

## Facets
- artifact type: framework
- maturity: stable
- function: orm, database, database-driver, serialization
- domain: databases, backend, web-development, developer-tools
- platform: jvm, cross-platform
- tags: sql-mapper, persistence, jdbc, annotations, xml-configuration, pojo-mapping

## Member repositories
- mybatis/mybatis-3 (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:30.131217+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:58:47.742229+00:00, confidence not recorded.
  - readme: https://github.com/mybatis/mybatis-3 (fetched 2026-08-28T04:11:30.131217+00:00, sha f6f9e411f790)
  - homepage: http://mybatis.github.io/mybatis-3/ (fetched 2026-08-29T07:57:27.295345+00:00, sha e810ffd93178)
  - site_page: https://mybatis.org/mybatis-3/getting-started.html (fetched 2026-08-29T07:57:27.304353+00:00, sha 06fd280ac931)
- Data as of 2026-08-30T08:39:29.467469+00:00.
