In-depth explanation of Common Database Connection Methods

Source: Internet
Author: User

Each data access uses its own communication protocol, including calling different interfaces and passing parameters. The information in different databases should be used in the same program. Normally, different database connection methods should be written, it is like writing multiple lite database clients in a program. This programming method will certainly make people uncomfortable, so we hope to have a unified way to access the database. Using this method to connect to the database will reduce a lot of pain.

Microsoft was the first person to bring the dawn to everyone, and introduced the concept of ODBC. Since then, all programs have no need to write their own database connection programs, and have entered the era of liberation. ODBC is a set of C-language-based APIs that can be compatible with different databases and provide unified access interfaces, saving you time in YY.

After the launch of ODBC, a new concept ole db emerged. This is an upgraded version of ODBC, because everything starts to be object-oriented, so this is implemented in the object mode. In addition, the performance has also been improved. Since then, ole db has become a new favorite of Microsoft.

ODBC and ole db are both underlying database access interfaces, which are not very convenient and easy to use, and the YY time is occupied by everyone, for this reason, Microsoft decided to release everyone again, so it came out with the concept of ADO. Obviously, this is an object, which is the high-level encapsulation of ole db and ODBC. It provides all the database operations that you often need to perform directly, and your YY time is rescued again.

However, Sun was not idle during this period. To save the YY time of JAVA programmers at a higher level, Sun independently wrote a set of database access interfaces (JDBC) dedicated to JAVA, when you hear the name, you will know that it is a fake idea. The only benefit is that calling in java code is more comfortable, and your home stuff must be used more easily.

Of course, sun in addition to the cottage creativity, but also retain the ODBC call interface [JDBC-ODBC bridge], in case of occasional needs; so in case one day in addition to a new thing only ODBC support, JDBC does not support. At this time, it is not too stressful. Of course, ODBC is also the most widely supported at present, and some non-mainstream database file access interfaces are also supported, so it is better to leave a hand.

In this way, the database access method becomes clear. See:

In this case, ODBC is the most widely used and the lowest layer. Basically all others may call it. JDBC and ole db are of a grade; sun and Microsoft; ADO is not a directly accessed program, it's just a quick access channel.

Note:All connection methods require the local machine to have the corresponding driver, and the driver corresponds to the specific database. In this way, there will be three types of drivers, each type of access to N kinds of databases requires N drivers.

Related Article

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.