Comparison and analysis of two Oracle application development interfaces

Source: Internet
Author: User
Tags comparison object model ole

This article describes two of the most common ways to develop Oracle Applications in Visual C + + 6.0: ADO (ActiveX Data Objects, ActiveX database objects) and OCI (Oracle call Interface, Oracle Invoke Interface). Through the design experiment, two kinds of data initialization, data reading and data updating are performed respectively, and the characteristics of the two methods are analyzed by comparing the code quantity and the running speed of the two methods, and finally, the advantages and disadvantages of the two methods and their applicable range are summed up.

Introduction

Oracle is widely used in many fields for its superior stability and superior performance, and its high performance is a key factor in Oracle's superior to other databases. However, the performance of the terminal application is not only the Oracle service program and the hardware environment, the application development language and development methods also have important impact.

At present, Oracle applications can be developed in a variety of development languages, such as VB, Delphi and other advanced development languages, can be developed in C + +, can also be developed in the Java language, even through ASP, JSP, Perl and other scripting languages to access Oracle. These language environment has its advantages, C + + is undoubtedly the pursuit of the ultimate speed of choice.

In C + + We can also have a variety of interface, you can use the common ADO interface, you can use Oci/occi, you can also use ODBC, oo4o and OLE DB and other means. In these ways, ADO and OCI are the most widely used two ways, this article will focus on the development of these two interfaces in Visual C + + 6.0 and their characteristics of the comparison.

A brief introduction of ADO development interface

The ADO (ActiveX data Objects,activex) is a Microsoft design for a powerful data access interface, OLE DB (object link and embedded database), and is an Easy-to-use application-tier programming interface. Applications written with ADO can access and manipulate data from the database server through the OLE DB provider. The main advantages of ADO are ease of use, access to multiple databases, and development in multiple languages.

Because ADO is based on automation (automation), ADO is widely used, not only in a high-level language development environment like Visual Basic, but also in some scripting languages, for developing Web applications and in ASP (Active Server page, Dynamic Server home page, access to the database in scripting Code provides a shortcut for operational application.

The model of ADO accessing the database is indicated in Figure 1.

Diagram 1:ado Model Diagram

As you can see from the illustration above, ADO is based on OLE DB, and it encapsulates OLE DB, so ADO is actually an application-layer interface for OLE DB, which is a middle tier between OLE DB and an application. This structure provides a good extensibility for a consistent data access interface and is no longer limited to specific data sources, and ADO is well supported as long as the data sources supported by OLE DB are available.

Another feature of ADO is its simplicity, which encapsulates the complex interface of OLE DB to connection, Recordset, command three principal objects and errors, Properties, The ADO object model is built by the parameters and fields four collection objects, as shown in the following figure:

Figure 2:ado Object Model

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.