|
What is ADO.NET?
ADO.NET is the
standard method by which .NET developers are able to interact with
databases. It comprises a large suite of class definitions which,
collectively, provide a rich environment for database access and
manipulation.
ADO.NET has a
relatively complex architecture and it is beyond the scope of this
manual to document all aspects of this technology. However, below
is a diagram which summarizes the way in which ADO.NET's
architecture is constructed.

ADO.NET is an
evolution of Microsoft’s previous ADO data access model. ADO.NET
uses some previous ADO class names, such as the Connection and Command, but
also introduces many new classes, the key ones being the DataSet,
DataReader, and DataAdapter.
The key difference
between ADO.NET and previous Microsoft data architectures is the
existence of the 'DataSet' class, which introduces the concept of a
separate and distinct level of data repository from any data store
(database). Because of this, the DataSet functions as a standalone
entity and may, thus, be regarded as an always disconnected
recordset with no knowledge of the source or destination of the data
it contains.
The DataSet is
comprised of entities which mimic the traditional database paradigm,
containing such things as tables, columns, relationships,
constraints and views.
A key concept
within ADO.NET is that of the 'DataAdapter' class connecting to the
database in order to fill the DataSet with data. Upon data update,
it can then connect back to the database in order to persist the
updates.
Historically, data
maintenance has been primarily connection-based. However, in an
attempt to make multi-tiered apps more efficient, data processing is
favoring a message-based approach revolving around the exchange of
chunks of information.
The DataAdapter
lies at the heart of this approach, providing a bridge to retrieve
and save data between a DataSet and its source data store. It
accomplishes this by the use of various 'Command' objects, each of
which being configured by the developer to contain the requisite
database manipulation commands in order to interact with the data
store in the desired manner.
The DataSet is
engineered heavily around the storage of data in XML format,
providing a consistent programming model able to work with broad
range of data storage products: flat, relational, and hierarchical.
It does this by not recording any information relating to the
source of its data, and by representing the data that it holds as
collections and data types. Irrespective of the actual source of
the data within the DataSet, its contents are manipulated through
the same set of standard APIs exposed through the DataSet and its
subordinate objects.
While the DataSet
has no knowledge of the source of its data, ADO.NET revolves around
the concept of a 'managed data provider', which, conversely, has
very detailed and specific information relating to the data source.
The role of the managed data provider is to connect, fill, and
persist the DataSet content to and from data stores. The concept of
a managed data provider manifests itself as a series of interfaces;
these interfaces need to be implemented by a developer in order to
provide the database specific logic which ultimately allows the
database neutral functionality of the DataSet to be connected to a
specific data store in order to provide data persistence.
Thus, in summary,
ADO.NET consists of the following conceptual objects, the
implementation of which is provided partly generically by the .NET
framework and partly by the database vendor/integrator.
|