MyBatis Introduction
MyBatis is an open source project for Apache ibatis,2010 This project was migrated from Apache Software Foundation to Google Code and renamed MyBatis. Migrated to GitHub in November 2013.
The term ibatis is derived from the combination of "Internet" and "Abatis" and is a Java-based persistence layer framework. MyBatis is an excellent persistence layer framework that supports common SQL queries, stored procedures, and advanced mappings. Eliminates the manual setting of almost all JDBC code and parameters and the retrieval of result sets. Use simple XML or annotations for configuration and raw mapping to map interfaces and Java objects to records in a database.
Comparison with Hibernate:
(1), MyBatis and Hibernate are the two most used ORM frameworks in the Java world.
(2), Hibernate concept is more advanced, fully implement object-oriented database programming, do not need to master SQL statements, you can implement database operations, can save developers to write a large number of SQL statements time.
(3), hibernate in the processing of multi-table association, there may be n+1 problems, performance will have a greater impact, to solve performance problems, need deeper hibernate knowledge and project experience.
(4), MyBatis need to write their own SQL statements, development efficiency is not as good as hibernate, it is difficult to do the underlying multi-database common.
(5), MyBatis controllable, it can be easier to optimize the SQL statement, improve efficiency.
MyBatis3.3.0