The ADO.NET Framework supports two models of Data Access Architecture, Connection Oriented Data Access Architecture and Disconnected Data Access Architecture. The ADO.NET Disconnected Data Access Architecture far more flexible and powerful than ADOs Connection Oriented Data Access.
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. On the other hand the disconnected approach makes no attempt to maintain a connection to the data source.
ADO.Net provides a new solution by introduce 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. DataSets 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 that might have been used to populate it.
Dim ds As New DataSet
DataSet ds = new DataSet();
In Connection Oriented Data Access, 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. Unlike the DataReader, the DataSet is not connected directly to a Data Source through a Connection object when you populate it. It is the DataAdapter that manages connections between Data Source and Dataset by fill the data from Data Source to the Dataset and giving a disconnected behavior to the Dataset. The DataAdapter acts as a bridge between the Connected and Disconnected Objects.vb.net
Dim adapter As New SqlDataAdapter("sql", "connection") Dim ds As New DataSet
adapter.Fill(ds, "Src Table")
SqlDataAdapter adapter = new SqlDataAdapter("sql", "connection"); DataSet ds = new DataSet();
adapter.Fill(ds, "Src Table");
By keeping connections open for only a minimum period of time, ADO .NET conserves system resources and provides maximum security for databases and also has less impact on system performance.