JDBC Disadvantage analysis

Source: Internet
Author: User

* The JDBC code is cumbersome, and each time JDBC needs to write "the same" six steps.

* SQL cannot be configured, in JDBC programming SQL statements are written in the Java source program, SQL statements often change (business changes), after SQL changes, need to re-modify the Java source code, recompile, redeploy, restart the server.
Obviously, this design violates a development principle: open/Close principle (OCP)
OCP: Open to extensions, close for modifications. (OCP is not part of a programming language, it is a part of software engineering)
After modification to ensure security, a re-test is required.

* The processing of result sets in the JDBC program is too cumbersome.
We need one out of the result set, then we create an object ourselves, and we have one set, and finally we have to put the object in the collection.
MyBatis can be done automatically. (Auto-map, MyBatis can automatically map records in database tables into Java objects.) )

JDBC Disadvantage analysis

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.