Install and configure ODBC in Linux/Unix

Source: Internet
Author: User
Tags driver manager
This article describes the simple principle of ODBC and how to install, configure, and program ODBC in LinuxUnix. I. ODBC principle ODBC is OpenDatabaseCo

This article describes the simple principle of ODBC and how to install, configure, and program ODBC in Linux/Unix. I. ODBC principle ODBC is Open Database Co

This article describes the simple principle of ODBC and how to install, configure, and program ODBC in Linux/Unix.

I. ODBC principles

ODBC is the abbreviation of Open Database Connect, which is a unified interface standard proposed by Microsoft in 1991 for accessing databases. It is the middleware between applications and Database systems. It performs database operations by interacting with the driver and application of the required database on the corresponding application platform, avoiding the direct call of database-related operations in the application, this provides database independence.

ODBC mainly consists of the driver and driver manager. A driver is a module used to support ODBC function calls. Each driver corresponds to the corresponding database. When an application is transplanted from one database system to another, you only need to change the alias of the corresponding database system set by the ODBC Administrator in the application. The driver manager can be linked to all ODBC applications and is responsible for managing the binding of ODBC functions to functions in the DLL in the application.

ODBC uses hierarchical methods to manage databases. At each layer of the database communication structure, it may depend on the characteristics of database products, ODBC introduces a public interface to solve potential inconsistency, thus solving the relative independence of database system applications, this is also one of the important reasons for the great success of ODBC since its launch.

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. The request is forwarded to the ODBC driver Manager. The driver manager completes or passes the request to multiple drivers in place ,, 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.

Many programmers have realized the benefits of ODBC on the Windows platform. However, when programming a database in Linux/Unix, they have to select a Unique API for programming based on different databases, once the database changes, all programs related to these APIs must be modified. In fact, in Linux/Unix, we now have our own ODBC, which can make our database programming as simple as on the Windows platform.

Next we will introduce ODBC in Linux/Unix:

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.