Next


Introducing ADO.NET

 ADO.NET stands for “ActiveX Data Objects.NET”.
 ADO.NET is known as “Database Technology”.
 It is used to develop the database interactive applications.
 It can be used for database connections and offers to perform database manipulations like inserting data to the tables, deleting un-necessary data, retrieving the required data from the tables etc.
 It can be used in any type of applications like console applications, windows applications, web sites, web services etc.
 It was developed based on it’s previous version called “ADO”.
 It offers much efficient features to easily handle with the database tables.

ADO.NET Database Connection Architecture

Note: Here, the driver acts as mediator between the frontend application and backend databases. The driver can also be called as “Provider”.

ADO.NET Database Transactions

 ADO.NET supports to perform the following transactions.
1. Query Processing
2. Non-Query Processing
3. Stored Procedure / Function Handling.

1) Query Processing:

Retrieves the data from the database with a “select statement”.

2) Non-Query Processing:

Doesn’t retrieves any data from database. It inserts / deletes / updates the data at the database. It is of 6 types.
a) Insertion
b) Deletion
c) Updation
d) Creating a table
e) Dropping a table
f) Altering a table

3) Stored Procedure / Function Handling:

Executes a stored procedure / a stored function, that is already created at backend.
ADO.NET Library
 ADO.NET offers some library (in the form of namespaces), in order to interact with the database data.
 The ADO.NET Library is available in the form of namespaces.
 API: System.Data
 In order to perform different database transactions, ADO.NET offers different classes.

ADO.NET NameSpaces:

1) System.Data
Contains necessary classes and namespaces to manipulate the databases.
2) System.Data.SqlClient
Contains necessary classes, used to connect and manipulate the Sql Server database.
3) System.Data.OleDb
Contains necessary classes, used to connect and manipulate the any other databases, except Sql Server.

ADO.NET Classes:

1) Connection:
Maintains the connection with the database.
2) Command:
Executes a query or non-query statement at backend.
3) DataReader:
It acts as a buffer, which holds the data, after execution of a query statement at backend.
4) DataAdapter:
Executes a query statement at backend. 5) Parameter:
Sends a parameter (argument) value to a backend stored procedure / function.>
6) DataSet:
Acts as a buffer, that holds multiple tables.
7) DataTable: Acts as a buffer, that holds a single table.
8) DataRow: Acts as a buffer, that holds a single row.