What are the different components of ADO.Net?
The famous diagram of the ADO.Net architecture and its components is presented in the figure below:
http://www.programmersheaven.com/articles/images/faq/image004.gif
All generic classes for data access are contained in the System.Data namespace. A short description of the core classes of ADO.Net is presented below:
| Class | Description |
|---|
| DataSet | The DataSet is a local buffer of tables or a collection of disconnected record sets |
| DataTable | DataTable is used to contain the data in tabular form using rows and columns.DataRow Represents a single record or row in DataTable |
| DataRow | Represents a single record or row in DataTable |
| DataColumn | Represents a column or field of DataTable |
| DataRelation | Represents the relationship between different tables in a data set. |
| Constraint | Represents the constraints or limitations that apply to a particular field or column. |
ADO.Net also contains some database specific classes. This means that different database system providers may provide classes (or drivers) optimized for their particular database system. The provider for such classes are called the Dot Net Framework Data Providers. Microsoft itself has provided the specialized and optimized classes for their SQL server database system. The name of these classes start with ‘Sql’ and these are contained in System.Data.SqlClient namespace. Similarly, Oracle has also provided its classes (driver) optimized for Oracle DB System. Microsoft has also provided the general classes which can connect your application to any OLE supported database server. The name of these classes start with ‘OleDb’ and these are contained in System.Data.OleDb namespace. In fact, you can use OleDb classes to connect to SQL server or Oracle database but using the database specific classes generally provides optimized performance.
The core objects that make up a data provider are:
| Class | Description |
|---|
| Connection | Represents a connection to the database system |
| Command | Represents SQL query or command to be executed at the database management system |
| DataAdapter | A class that connects to the database system, fetch the record and fill the dataset. It contains four different commands to perform database operations; Select, Update, Insert, Delete. |
| DataReader | A stream that reads data from the database in connected design |
| Parameter | Represents a parameter to a stored procedure |
Back