Introduction to ADO and ADO. net

Source: Internet
Author: User
1. Introduction to ADO and ADO. net

ADO and ADO. net is both similar and different. They are able to write applications that access and operate data on database servers, and are easy to use, fast, low-memory, and occupy less disk space, supports the creation of Client/Server-based and web-based applications. However, ADO uses ole db interfaces and is based on Microsoft's COM technology, while ADO. Net has its own ADO. net interface and is based on Microsoft's. NET architecture. As we all know, the. NET system is different from the com system, and the ADO. net interface is completely different from the ADO and ole db interfaces. That is to say, ADO. NET and ADO are two data access methods.
  
2. History of data access methods
Next, let's briefly review several stages of Microsoft's data access methods.
  
ODBC-(Open Database Connectivity) is the first data access technology to access different relational databases using SQL. ODBC applications can be used to manipulate different databases through a single command. What developers need to do is to add the corresponding ODBC driver to different applications.
  
Unlike ODBC, Dao-(data access objects) is intended for C/C ++ programmers. It is a simple data access method provided by Microsoft to Visual Basic developers, used to manipulate the ACCESS database.
  
Rdo-when using Dao to access different relational databases, the jet engine had to convert commands between Dao and ODBC, leading to performance degradation, while rdo (Remote Data Objects) the appearance.
  
Ole db-as more and more data is stored in non-relational format, a new architecture is required to provide seamless connection between such applications and data sources, based on COM (Component Object Model) ole db came into being.
  
Ado-the ADO Based on ole db is simpler, more advanced, and more suitable for Visual Basic programmers. It eliminates the various drawbacks of ole db and is replaced by the Development Trend of Microsoft technology.
3. Comparison between ADO and ADO. net
At the beginning of designing the. NET architecture, Microsoft decided to re-design the data access model so that it could be fully based on the XML and offline computing models. The main differences between the two are:
  
ADO is stored in recordset, while ADO. NET is represented in dataset. The recordset looks more like a single table. If you want the recordset to be represented in multiple tables, you must connect multiple tables in SQL. Instead, dataset can be a set of multiple tables. The operation of ADO is an online method, which means that both browsing and updating data must be real-time. ADO. net is used offline, ADO. net will use XML to make a copy of the data, ADO.. Net databases must be connected online only during this period.
  
Since ADO uses the COM technology, this requires that the data type used must comply with the COM specification, while ADO. net is based on the XML format, and the data types are more abundant and do not need to be converted due to the com orchestration, thus improving the overall performance.
  
4. Summary
ADO. NET provides an Optimized Data Access Model for the. NET architecture. It is similar to the com-based ADO.

There is a big difference between ado.net and ADO:
1.ado.net follows a more general principle and is not so dedicated to databases. Ado.net is a collection of all classes that allow data processing. These classes represent data container objects with typical database functions (such as indexing, sorting, and views. Although ado.net is an authoritative solution for. NET database applications, it is not database-centric as the ADO Data Model in general design, which is a major feature of ado.net.
2. Currently, ado.net provides two types of database access class libraries: one for SQL Server 7.0 or later, and the other for all other OLE DB providers that you may have installed. In both cases, you use different classes, but follow similar naming rules. Except the prefix, the names are the same. The prefix of the former case is SQL, and the latter case is oledb. The. NET Framework also provides the ODBC. NET data access mode. ODBC. NET data provider is an enhancement component of the. NET Framework. It can access the original ODBC driver, just as ole db. NET data provider can access the original ole db providers. Currently, it has only been tested in the following drivers: Microsoft SQL ODBC driver, Microsoft ODBC driver for Oracle, Microsoft JET ODBC driver.
3.ado.net provides two formations for processing data extracted from the data source. They are DataSet and datareader objects. The former is the cache recorded in the memory, and you can freely access and modify it in any direction. The latter is a highly optimized object, designed for Rolling read-only records in only forward mode.
4.ado.net unifies the data container programming interfaces. No matter what applications, Windows Forms, web forms, or web services you plan to write, you can use the same group of classes to process data. Regardless of the number of data sources on the backend, the SQL Server database, OLE DB, XML file, or an array, you can use the same method and attributes to scroll and process their content.
5. In ADO, XML is only in the input and output formats. However, in ado.net, XML is a data format that provides a means to operate, organize, share, and transmit data.

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.