The difference between ibatis and mybatis, the difference between hibernate, mybatis, and JDBC

What is the difference between ibatis and mybatis?


ibatis is the predecessor of mybatis. In July/August 2010, the ibatis project moved to google, and ibatis3.x was officially renamed mybatis3.x.

In addition, mybatis is more convenient to use than ibatis, including:

1) Mybatis implements interface binding, which is more convenient to use. 

2) Improvement of object-relational mapping, higher efficiency

3) MyBatis employs powerful OGNL-based expressions to eliminate other elements


Differences between Hibernate, MyBatis, and JDBC


1) From a hierarchical point of view, JDBC is the lower-level persistence layer operation mode, while Hibernate and MyBatis are encapsulated on the basis of JDBC to make it more convenient for programmers to operate the persistence layer.

2) From a functional point of view, JDBC simply establishes a database connection, then creates a statement, and passes the sql statement to the statement for execution. If it is a query statement that returns a result, it will

The query results are placed in the ResultSet object, and the data is obtained by traversing the ResultSet object; Hibernate is a java object that maps the data table in the database to the persistence layer.

Integrity control of data tables; MyBatis maps input parameters and output parameters in sql statements to java objects, giving up integrity control of data tables, but gaining more flexibility and response

The advantage of faster performance.

3) From the point of view of use, if you are doing low-level programming and have extremely high performance requirements, you should use JDBC; if you want to control the integrity of the database, it is recommended to use Hibernate;

If you want to use sql statements flexibly, it is recommended to use the MyBatis framework.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325985581&siteId=291194637