Working principle of ADO. Net dataset (Dataset)

Source: Internet
Author: User

A dataset, also known as a data set, data set, or data set, is a collection composed of data. A Data Set (or dataset) is a collection of data, usually in the form of tables.

DatasetIt does not directly deal with the database. The interaction between the database and the database is provided through. NET data.ProgramThe data adapter object in. How does a dataset work?

1. The application sends a request to the server to obtain data.

2. the server sends the response data to the dataset through the. NET dataset provider.

3. The dataset sends data to the client.

4. The client is modified and stored in the dataset.

5. The dataset saves the modified data to the server.

Working principle of ADO. Net dataset Dataset:

 

First, the client establishes a connection with the database server.

Then, the client application sends data requests to the database server. After receiving the data request, the database server retrieves and selects the data that meets the condition and sends the data to the client. In this case, the connection can be closed.

Next, the dataset transmits data to the client application in the form of data binding controls or direct reference. If data changes during running of the client application, it modifies the data in the dataset.

When an application is running at a certain stage, for example, if the application needs to save data, you can establish a connection from the client to the database server and submit the modified data in the dataset to the server, the connection is closed again.

This kind of work process that does not require real-time database connection is called for non-connection data access. When processing data in a DataSet object, the client application only uses data copies in the memory of the local machine. This relieves the pressure on the database server and network, because the database server can be connected only when the data is obtained for the first time, edited, and uploaded back to the database.

Although this non-connection-oriented data structure has advantages, there are still problems. When the environment is disconnected, the client application does not know the changes made by other client applications to the original data in the database. It is possible to get outdated information.

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.