ActiveX Data Object.NET (ADO.NET) is a software library in the .NET framework consisting of software components that programmers can use to access data and data services based on disconnected access to data sources, which can be relational or non-relational (such as XML or application data).
The architecture of ADO.NET is based on two primary elements:
- .NET framework data provider
Dataset provides the following components:
- a complete set of data including related tables, constraints and their relationships
- functionality-like access to remote data from XML Web service
- manipulation of data dynamically
- data processing in a connectionless manner
- provision for hierarchical XML view of relational data
The .NET framework data provider includes the following components for data manipulation:
- Connection: This provides connectivity to the data source
- Command: This executes the database statements needed to retrieve data, modify data or execute stored procedures.
- DataReader: This retrieves data in forward only and read-only form.
- DataAdapter: This acts as bridge between dataset and data source to load the dataset and reconcile changes made in dataset back to the source.
The ADO.NET Framework supports two models of Data Access Architecture.
- Connection Oriented Data Access Architecture :
In Connection Oriented Data Access Architecture the application makes a connection to the Data Source and then interact with it through SQL requests using the same connection. In this case the application stays connected to the database system even when it is not using any Database Operations.When you read data from a database by using a DataReader object, an open connection must be maintained between your application and the Data Source.
- Disconnected Data Access Architecture.
ADO.Net disconnected architecture solves the problem of maintaining the connection by introduces a new component called Dataset. The DataSet is the central component in the ADO.NET Disconnected Data Access Architecture. A DataSet is an in-memory data store that can hold multiple tables at the same time. DataSet only hold data and do not interact with a Data Source. One of the key characteristics of the DataSet is that it has no knowledge of the underlying Data Source.