NOTE
MyBatis Overview
MyBatis as a SQL-mapping framework: explicit SQL, parameter/result mapping, sessions, mappers, and transaction boundaries.
This is a historical learning note and may contain outdated or incomplete understanding.
MyBatis maps Java calls/objects to explicitly authored SQL and maps result sets back to Java values.
Unlike a full ORM that tries to model most persistence behavior through entities, MyBatis keeps SQL visible and gives applications direct control over joins, hints, vendor features, and query shape.
Core concepts include SqlSession, mapper interfaces/statements, parameter binding, result mapping, configuration, plugins, and transaction integration. Keep sessions scoped correctly and avoid interpolating untrusted values into SQL text.