Database strategic high resolution (3) ODBC

Source: Internet
Author: User
Tags driver manager
A complete ODBC consists of the following components: 1. Application Program (Application ).

2. ODBC Manager (Administrator): The management center of the entire architecture.

3. Driver MANAGER: A component centrally managed by ODBC drivers.

4. odbc api: Specifies the SQL statement format in the program and the function headers of functions related to database access.

5. ODBC driver: communicates with a specific DBMS and calls the APIS provided by the DBMS. The odbc api calls the ODBC driver itself (through the driver manager ).

6. Data Source: Database location, database type, and other information to ensure full identification and differentiation of databases

The relationship between components is shown in the following figure:

To access a database, an application must first register a data source using the ODBC Manager. The manager registers a data source based on the database location, database type, ODBC driver, and other information provided by the data source, establish a connection between ODBC and a specific database. In this way, as long as the application provides the data source name to ODBC, ODBC can establish a connection with the corresponding database. In ODBC, ODBC APIs cannot directly access the database and must exchange information with the database through the driver manager. The driver manager is responsible for passing the application's odbc api call to the correct driver. After the driver completes the corresponding operation, return the result to the application through the driver manager. The ODBC driver is required to access the ODBC data source.

In terms of structure, ODBC is divided into single-bundle type and multi-bundle type. 1. Single-bundle driver A single-bundle driver is between an application and a database, providing a unified data access method like an intermediary driver. When a user performs database operations, the application passes an ODBC function call to the ODBC driver manager, the odbc api determines whether the call is directly processed and whether the result is returned or sent to the driver for execution and the result is returned. As can be seen from the above, a single-bundle driver itself is a database engine that can directly perform database operations, although the database may be located anywhere on the network. 2. Multi-bundle driver A multi-bundle driver transfers commands and data between the database engine and the customer application. It does not execute data processing but is used for remote operations on a network communication protocol interface. The front-end application sends a request to the database, which is forwarded to the ODBC driver Manager. The driver manager completes or passes the request to multiple bundles of drivers, the multi-bundle driver translates requests into forms that can be understood by the database communication interfaces of specific manufacturers (such as the sqlnet of Oracle) and submits them to interfaces for processing, the interface sends the request to the data engine on the server over the network. After the server completes processing, it sends the result back to the database communication interface. The database interface sends the result to multiple ODBC drivers, then, the driver sends the result to the application.




Note: from a certain perspective, ODBC is a specific database driver, or a (User API)-to-multiple (DBMS) driver. However, ODBC is also an internal standard. However, the standards are not public and are only implemented by Microsoft.

Developer: Ms


 

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.