0% found this document useful (0 votes)
5 views4 pages

ADO.NET Architecture Overview

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

ADO.NET Architecture Overview

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C#.

NET SHREE MEDHA DEGREE COLLEGE, BALLARI

UNIT 5 (ADO .NET Connectivity)

INTRODUCTION to [Link]

ADO is the acronym for ActiveX Data Objects. It is an application program interface from Microsoft that
allows a programmer writing Windows applications get access to a relational or non-relational database
from both Microsoft and other database providers. ADO acts as a layer to access any data stored in a generic
manner from the application code. It eliminates the need to be knowledgeable in database implementation
and reduces the complexity of dealing with the low level code needed to handle the data.

ADO originated from the concept of Remote Data Object (RDO) and Data Access Object (DAO) and was
first released in 1996. As one of the constituents of MDAC (Microsoft Data Access Components), ADO
together with other MDAC constituents provides a framework of components used by client applications to
access SQL, semi-structured and legacy data stores.

What Is [Link]?

[Link] is a data access technology that provides communication between relational and non-relational
systems through a common set of components. [Link] being a technology from Microsoft .NET
Framework, can also be described as a set of classes (a framework) to interact with data sources such as
databases and XML files. [Link] framework is commonly used by programmers to access and modify
data stored in relational database systems, though it can also access data in non-relational data sources. The
following are a few of the .NET applications that use [Link] to connect to a database, execute
commands and retrieve data from the database.

• [Link] Web Applications


• Console Applications
• Windows Applications.

The Architecture of [Link]:


The [Link] Architecture is comprised of 6 important components. They are as follows:
1. Connection
2. Command
1

3. DataReader
Page

Dept of Computer Science From the desk of Ms. Vinutha H M [Link]. (CS)
C#.NET SHREE MEDHA DEGREE COLLEGE, BALLARI

4. DataAdapter
5. DataSet
6. DataView
From the above components, two components are compulsory. One is the command object and the other one
is the connection object. Irrespective of the operations like Insert, Update, Delete and Select, the command
and connection object you always need. For a better understanding, please have a look at the following image.

Connection:
The first important component of [Link] Architecture is the Connection Object. The Connection Object
is required to connect with your backend database which can be SQL Server, Oracle, MySQL, etc. To create
a connection object, you need at least two things. The first one is where is your database located i.e. the
Machine name or IP Address or someplace where your database is located. And the second thing is the security
credentials i.e. whether it is a Windows authentication or SQL Authentication i.e. user name and password-
based authentication. So, the first is to create the connection object and the connection object is required to
connect the front-end application with the backend data source.
2
Page

Dept of Computer Science From the desk of Ms. Vinutha H M [Link]. (CS)
C#.NET SHREE MEDHA DEGREE COLLEGE, BALLARI

Command:
The Second important component of [Link] Architecture is the Command Object. When we talk about
databases like SQL Server, Oracle, MySQL, etc., we know one thing, these databases only understand SQL.
The Command Object is the component where you go and write your SQL queries. Later you take the
command object and execute it over the connection. That means using the command object, you can fetch
data or send data to the database i.e. performing the Database CRUD Operations.

Note: From the Command Object onwards, you can go in two different ways. One is you can go with the
DataSet way and the other is, you can go with the DataReader way. Which way you need to choose, basically
will depend on the situation.

DataReader:
DataReader is a read-only connection-oriented recordset that helps us to read the records only in the forward
mode. Here, you need to understand three things i.e. read-only, connection-oriented, and forward mode. Read-
Only means using DataReader, we cannot Insert, Update, and Delete the data. Connection-Oriented means, it
always requires an active and open connection to fetch the data. Forward mode means you can always read
the next record, there is no way that you can read the previous record.

DataSet:
It is a Disconnected record set that can be browsed in both i.e. forward and backward mode. It is not read-only
i.e. you can update the data present in the data set. Actually, DataSet is a collection of DataTables that holds
the data and we can add, update, and delete data in a data table. DataSet gets filled by somebody called
DataAdapter.

DataAdapter:
The DataAdapter is one of the Components of [Link] which acts as a bridge between the command object
and the dataset. What the DataAdapter does is, it takes the data from the command object and fills the data
set.

DataView Class
The DataView class enables us to create different views of the data stored in a DataTable. This is most often
used in data-binding applications. Using a DataView, we can expose the data in a table with different sort
3
Page

orders, and you can filter the data by row state or based on a filter expression.

Dept of Computer Science From the desk of Ms. Vinutha H M [Link]. (CS)
C#.NET SHREE MEDHA DEGREE COLLEGE, BALLARI

4
Page

Dept of Computer Science From the desk of Ms. Vinutha H M [Link]. (CS)

You might also like