We will see overview of ADO.NET. This is the first part of the ADO.NET Series article.
Introduction
ADO.NET is a set of classes that together allow your applications to interact with the information stored in a database.
The main difference between ADO.NET and its earlier version, ADO (ActiveX Data Object), is that ADO.NET uses a disconnected architecture. This means that ADO.NET doesn't work directly on the information in the database but on a local copy of that information.
A DataSet object is a cache used to store data from the database on your local machine. You work on the dataset, making changes to the data contained there.
You then create a new DataSet object containing only the changes that have been made to the data, and you upload those changes to the original database.
All communications and data changes between the dataset and the database in ADO.NET are handled by these namespaces:
-
System.Data
-
System.Data.Common
-
System.Data.OleDb
-
System.Data.SqlClient
-
System.Data.SqlTypes
System.Data
The System.Data namespace defines the generic types that represent data, including the Table, Row, Column, Constraint, and DataSet types.
System.Data.Common
The System.Data.Common namespace contains the types shared by the managed providers that handle the transmission of data between the dataset and database.
System.Data.OleDb
The types in the System.Data.OleDb namespace allow you to connect to OLE databases, executing SQL commands and populating datasets.
System.Data.SqlClient
The types in the System.Data.SqlClient namespace are used by the SQL-managed providers that connect to Microsoft SQL Server.
System.Data.SqlTypes
The types in the System.Data.SqlTypes namespace are optimized to represent the data types used by Microsoft SQL Server itself.
ADO.NET is closely integrated with XML. You can now present the data in a database as an XML document rather than a set of tables, and XML is used to transmit data. This has two main advantages:
• Bypasses Firewalls
• Improves Processing Time
Bypasses Firewalls
Because ADO.NET uses XML, which is transmitted over HTML port 80, it passes through most company firewalls.
Improves Processing Time
ADO uses COM to manage the transmission of data, which means that all data has to be translated into the types recognized by COM before being translated back to the database types. This involves a large processing overhead, which ADO.NET avoids by using XML.
Thanks and Have Fun!!!!!