This article is a mirror article of machine translation, please click here to jump to the original article.

View: 8122|Reply: 0

Database Access Methods (ODBC OLEDB ADO ADO.NET)

[Copy link]
Posted on 8/1/2020 8:41:19 PM | | | |
ODBC (Open Database Connectivity)

In 1992, Microsoft Corporation was established as an integral part of the Windows Open Services Architecture (WOSA) regarding databases, which established a set of specifications and provided a set of standard APIs (Application Programming Interfaces) for database access. These APIs leverage SQL to accomplish most of their tasks. ODBC itself also provides support for the SQL language, and users can directly send SQL statements to ODBC. --- the earliest, but not always omnipotent. ODBC (Open DataBase Connectivity) is an application programming interface (API) advocated by Microsoft and currently widely accepted in the industry for database access, which is based on the X/Open and ISO/IEC call-level interface (CLI) specifications and uses Structured Query Language (SQL) as its database access language. The overall structure of ODBC has four components:

A. Application: Execute processing and call ODBC API functions to submit SQL statements and retrieve results.
B. Driver Manager: Load/uninstall drivers according to the application's needs, handle ODBC function calls, or transfer them to the driver.
C. Driver: Handles ODBC function calls, submits SQL requests to a specified data source, and returns the results to the application. If necessary, the driver modifies the program request to align the request with the syntax supported by the relevant DBMS.
D. Data source: including the data to be accessed by the user and its related operating system, DBMS, and the network platform used to access the DBMS.

DAO (Data Access Object)

In 1993, Microsoft introduced the Microsoft Jet database engine (originally used for Microsoft Access and now supports other databases) and allows developers to connect directly to Access tables as they do to other databases via ODBC. DAOs are best suited for single-system applications or small, locally distributed use. Access to the Jet database has been optimized internally and is easy to use. Therefore, if the database is an Access database and is used locally, it is recommended to use this access method --- the specificity of the application


RDO (Remote Data Objects)


In 1995, RDO was an object-oriented data access interface to ODBC that was combined with an easy-to-use DAO style to provide an interface that showcased all ODBC's underlying features and flexibility. Although RDO is limited in terms of good access to Jet or ISAM databases, and it can only access relational databases through existing ODBC drivers. However, RDO has proven to be the best interface for many SQL Server, Oracle, and other large relational database developers. RDO provides more and more complex objects, properties, and methods for accessing stored procedures and complex result sets. --- is undoubtedly based on ODBC


OLE DB (Object Linking and Embedding, Database)


In 1997, Microsoft launched a strategic system-level programming interface to manage data across the organization. OLE DB is an open specification built on top of ODBC functionality. ODBC is developed specifically for accessing relational databases, while OLE DB is used to access relational and non-relational information sources such as host ISAM/VSAM and hierarchical databases, email and file system storage, text, graph, and geographic data, and custom business objects.
OLE DB defines a set of COM interfaces that encapsulate various database management system services and allow the creation of software components to implement these services. OLE DB components include data providers (containing and representing data), data consumers (using data), and service components (processing and delivering data, such as query processors and cursor engines).
The OLE DB interface facilitates smooth integration of components, allowing OLE DB component vendors to quickly deliver high-quality OLE DB components to the market. In addition, OLE DB includes a "bridge" to connect ODBC, providing consistent support for the various ODBC relational database drivers in use. --- claims to replace ODBC, but it is also compatible with ODBC

ADO (ActiveX Data Object)

In 1996, ADO was the successor to DAO/RDO. ADO 2.0 is more functionally similar to RDO and, in general, has a similar mapping relationship between the two models. ADO "extends" the object model used by DAOs and RDOs, meaning it contains fewer objects, more properties, methods (and parameters), and events. As the latest database access mode, ADO is also simple and easy to use, so Microsoft has made it clear that it will focus on ADO in the future and will not upgrade DAO/RDO, so ADO has become the mainstream of current database development. ADO involves three types of data storage: DSN (Data Source Name), ODBC (Open Data Connection), and OLE DB. The following routines will explain in detail the specific implementation of these three methods. --- can be said to be the convergence of system-level programming interfaces such as ODBC and OLEDB, and the upgrade of application-level programming interfaces such as DAO and RDO.

ADO.NET

is a standards-based programming model that can be used to create distributed applications for data sharing. In ADO.NET, DataSets play an important role, serving as in-memory copies of some of the data in the database. Unlike RecordSets in ADO, DataSets can include any data table, each of which can be used to represent data from a database table or view. The DataSet resides in memory and is not attached to the original database, that is, it does not need to remain connected to the original database. The underlying technology that does the job is XML, which is the storage and transfer format used by DataSets. During runtime, data in a DataSet needs to be exchanged between components, such as a business logic object or asp.net web form. Data is transferred from one component to another in the form of an XML file, which restores the file to DataSet form. The DataSet approach is exactly the same as the relational data model, because the protocols of each data source are different, and we need to access the data source through the correct protocol. Some older data sources use the ODBC protocol, and some later data sources use the OleDb protocol, and now, there are still many new data sources emerging, ADO.NET provide a common way to access data sources, and for different data sources, it uses different libraries. These libraries are called Data Providers and are usually named after the type of data source and the protocol


Differences and connections between ODBC, DAO, ADO, and OLEDB databases



ODBC is an underlying access technology, so ODBC API can be a customer application that can set up and control the database from the bottom up, and complete some functions that advanced database technology cannot complete; However, the disadvantage is that ODBC can only be used for relational databases, making it difficult to access object databases and other non-relational databases using ODBC.
DAOs provide a mechanism for creating and manipulating databases through procedural code. The biggest feature is that it is easy to operate with MICROSOFT JET databases, and it is one of the best technical interfaces for operating JET databases. And it is not only used to access this database, in fact, it is possible to access a wide range of data formats, from text files to large background databases, through DAO technology.
ADO is an access interface based on OLE DB, which is an object-oriented OLE DB technology that inherits the advantages of OLE DB. It is a high-level interface for database access.



The relationship between ADO and OLEDB

OLEDB is an underlying data access interface interface. It is used by third-party drivers, merchants to develop applications that output data sources to ADO-technology, or developers for C++ to develop custom database components.
OLE DB is an important system-level programming interface for accessing data, and it is the foundational technology of ADO and the data source for ADO.NET.
ADO is an access interface based on OLE DB, which is an object-oriented OLE DB technology that inherits the advantages of OLE DB. It is a high-level interface for database access.

It can be said that ADO provides high-level application API functions for OLEDB.





Previous:SSIS Tutorial 4 Synchronize MySQL Data to a SQL Server Database
Next:SSIS Tutorial (3) Add a MySQL data source
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com