What are the main improvements of ADO. net compared with ADO?

Source: Internet
Author: User

Memory representation of data
In ADO, the data in memory is represented as a record set. In ADO. net, it is a dataset. There are important differences between them.
Number of tables
The record set looks like a single table. If a record set contains data from multiple database tables, it must use join queries to combine data from each database table into a single result table.
Instead, a dataset is a set of one or more tables. Tables in a dataset are called data tables. Specifically, they are data tables.
Object. If a dataset contains data from multiple database tables, it usually contains multiple able objects. That is, each datatable
Objects usually correspond to a single database table or view. In this way, the dataset can mimic the structure of the basic database.
A dataset usually contains links.. The relationships in a dataset are similar to foreign key relationships in a database, that is, they associate rows in multiple tables. For example, if the dataset contains a table about the investor and another table about the stock purchase of each investor, the dataset may also contain a relationship to connect the rows in the investor table and the corresponding rows in the purchase table.
Since a dataset can store multiple independent tables and maintain information about the relationship between tables, it can store a much richer data structure than a record set, including Self-associated tables and tables with many-to-many relationships.
Data navigation and cursors
In ADO, you use the ADO movenext method to sequentially scan rows in the record set. In ADO. net
The row is a set. Therefore, you can access a Specific Row through a table, or through an index of the serial number or primary key. Datarelation
The object maintains information about the master record and detailed data record, and provides methods for you to obtain records related to the records being operated. For example
Sun, you can find the group of rows in the purchase table that describes the purchase status.
Minimize the connection opening time
In ADO. net, only enough time to open the connection to perform database operations, for example, select)
Or "Update ). You can read rows into a dataset and use them without retaining the connection to the data source. In ADO, record sets can provide non-connection access,
ADO is mainly designed for connection access.
There is a significant difference between non-connection processing in ADO and ADO. net. In ADO, you can call the ole db provider to communicate with the database. Ado. net
Through tableadapter or data adapter (such as sqldataadapter) to communicate with the database, this calls OLE DB
APIS provided by the provider or basic data source. The main difference between ADO. NET and ADO. NET is that
The adapter allows you to control how changes made to the dataset are transmitted to the database by optimizing performance, performing data verification checks, or adding any additional processing.
Share data between applications
It is much easier to transmit ADO. Net datasets between applications than to transmit records that are not connected by ADO. To transmit a record set that is not connected to ADO from one component to another, use Com. To transmit data in ADO. net, use a dataset that can transmit XML streams.
Compared with COM, XML file transmission provides the following convenience:
Richer Data Types
The Com mail handling service provides a set of limited data types (the types defined by the COM standard ). Since datasets in ADO. NET are transmitted in XML format, there are no restrictions on data types. Therefore, components that share datasets can use any rich data type set that these components generally use.
Performance
Transfers large ADO Record Sets or large ADO. NET data sets to use network resources. As the data volume increases, the network pressure is also increasing. ADO and ADO. net
Allows you to minimize the amount of data transmitted. However, ADO. Net also provides another performance advantage: Ado. Net does not require data type conversion. Com
The ADO data type that is sent to transfer the record set between components must be converted to the com data type.
Penetration Firewall
The firewall can affect two components that attempt to transmit unconnected ADO record sets. Remember that the firewall is usually configured to allow HTML text to pass, but to prevent system-level requests (such as com mails) from passing through.
Because components use XML to exchange ADO. Net databases, the firewall can allow the dataset to pass through

Comments:

Upgrading from ADO to ado.net is a leap in Microsoft's data processing technology. Understanding the differences between them allows us to better understand the characteristics of ado.net.

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.