ADO.NET Explained

ADO.NET is a standards-based programming model for creating distributed, data-sharing applications.

If you have experience with ADO, you know that the RecordSet was the centerpiece of the model…where the rubber met the road, so to speak. In ADO.NET, the DataSet is the centerpiece. It's an in-memory copy of the data from a data store. Unlike an ADO RecordSet, a DataSet can contain any number of DataTables, each of which could represent the data from a database table or view. The DataSet resides in memory, disconnected from the original data store. In other words, the DataSet can exist without an active connection to the data store.

The underlying technology at work is XML, which is the persistence and transmission format for the DataSet. At runtime, components (such as a business logic object or an ASP.NET Web Form) need to exchange the data in the DataSet. The data is transmitted from one component to the other in the form of an XML file, and the receiving component materializes the file in the form of a DataSet. The DataSet is built with methods consistent with the relational data model. As mentioned earlier, the DataSet has a collection of DataTables. Each DataTable has a collection of DataRows and DataColumns, as well as relationships to other DataTables.

Figure 2.1 shows you the major components in an ADO.NET-based solution.

Figure 2.1. The major components of an ADO.NET solution.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.220.219