What is the difference between Ibatis and hibernate?

Source: Internet
Author: User

The same point: masking the underlying access details of the JDBC API, using our ability to access data without dealing with the JDBC API.

The JDBC API programming process is fixed, and SQL statements are mixed with Java code, often with a patchwork of SQL statements, and the details are cumbersome.

Ibatis Benefits: Masking The underlying access details of the JDBC API, separating the SQL statement from the Java code, providing the ability to automatically encapsulate the result set as a collection of entity objects and objects, queryForList returns a collection of objects, Returns a single object with queryForObject, and provides parameters that automatically pass the properties of an entity object to an SQL statement.

Hibernate is a fully automated ORM mapping tool that automatically generates SQL statements, Ibatis requires us to write SQL statements in XML configuration files, and hibernate is more responsible and powerful than the Ibatis feature. Because hibernate generates SQL statements automatically, and we can't control the statement, we can't write a specific high-efficiency SQL. For some of the less complex SQL queries, hibernate can be very good for us to do, but for particularly complex queries, hibernate is difficult to adapt to, this time with Ibatis is a good choice, because ibatis or we write SQL statements.

What is the difference between Ibatis and hibernate?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.