Differences between jdbc and odbc: perception, learning..., jdbcodbc

Source: Internet
Author: User
Tags dbase driver manager

Differences between jdbc and odbc: perception, learning..., jdbcodbc

What is JDBC? JDBC, fully known as Java DataBase Connectivity standard, is an object-oriented application interface (API) that can be used to access various relational databases. JDBC is also part of the java core class library. JDBC is independent of a specific relational database. Similar to ODBC (Open Database Connectivity), JDBC APIs define Java classes to indicate connections to databases, SQL statements (SQL statements ), result sets and other database objects make it easy for Java programs to interact with the database and process the results. With JDBC, all Java programs (including Java applications, applets, and servlets) can access the database through SQL statements or stored procedures in the database (stored procedures. To access a specific database through JDBC, a corresponding JDBC driver must be provided by the manufacturer of the production database, which serves as a bridge between the jdbc api and a specific database. Generally, Java programs first use the jdbc api to interact with the JDBC Driver Manager. The JDBC Driver Manager loads the specified JDBC drivers and then can access the database through the jdbc api. ODBC (Open Database Connectivity) is an integral part of the Database in Microsoft's WOSA (Windows Open Services Architecture). It establishes a set of specifications, it also provides a set of standard APIs for database access (application programming interfaces ). These APIs use SQL to complete most of their tasks. ODBC also provides support for the SQL language. You can directly send SQL statements to ODBC. An ODBC-based application does not rely on any DBMS for database operations and does not directly deal with DBMS. All database operations are completed by the corresponding dbms odbc driver. That is to say, both FoxPro, Access, and Oracle databases can be accessed using ODBC APIs. It can be seen that the biggest advantage of ODBC is that it can process all databases in a unified manner. A complete ODBC consists of the following components: Application ). ODBC Manager (Administrator ). The program is located in 32-bit ODBC on Windows 95 Control Panel. Its main task is to manage the installed ODBC driver and manage the data source. Driver Manager ). The driver manager is included in ODBC32.DLL and transparent to users. Its task is to manage ODBC drivers and is the most important component in ODBC. Odbc api. ODBC driver. Is a DLL that provides interfaces between ODBC and databases. Data source. The data source contains information such as the database location and database type, which is actually an abstraction of data connections. As shown in the relationship between components: before an application accesses a database, it must first register a data source using the ODBC Manager. The manager registers the 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. You can use Visual C ++ 5.0 to install drivers such as SQL Server, Access, Paradox, dBase, FoxPro, Excel, Oracle, and Microsoft Text. by default, VC5.0 only installs drivers for SQL Server, Access, FoxPro, and dBase. if you need to install another driver, you need to re-run the installation program of VC 5.0 and select the required driver.

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.