ADO.NET

ADO.NET

ADO.NET is a set of computer software components that can be used by programmers to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also be used to access data in non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

Architecture

ADO.NET consists of two primary parts:

Data provider

These classes provide access to a data source, such as a Microsoft SQL Server or Oracle database and OLEDB data provider. Each data source has its own set of provider objects, but they each have a common set of utility classes:

* Connection: Provides a connection used to communicate with the data source. Also acts as an abstract factory for command objects.
* Command: Used to perform some action on the data source, such as reading, updating, or deleting relational data.
* Parameter: Describes a single parameter to a command. A common example is a parameter to a stored procedure.
* DataAdapter: A bridge used to transfer data between a data source and a DataSet object (see below).
* DataReader: Used to efficiently process a large list of results one record at a time. It allows records to be accessed in a read-only, forward-only mode, i.e., records have to be accessed in sequential order; they can neither be randomly accessed nor can a record which has been processed previously be accessed again.

DataSets

DataSets objects, a group of classes describing a simple in-memory relational database, were the star of the show in the initial release (1.0) of the Microsoft .NET Framework. The classes form a containment hierarchy:

* A DataSet object represents a schema (either an entire database or a subset of one). It can contain tables and relationships between those tables.
** A DataTable object represents a single table in the database. It has a name, rows, and columns.
*** A DataView object "sits over" a DataTable and sorts the data (much like a SQL "order by" clause) and filters the records (much like a SQL "where" clause) if a filter is set. An in-memory index is used to facilitate these operations. All DataTables have a default filter, while any number of additional DataViews can be defined, reducing interaction with the underlying database and thus improving performance.
**** A DataColumn represents a column of the table, including its name and type.
**** A DataRow object represents a single row in the table, and allows reading and updating of the values in that row, as well as retrieving any rows that are related to it through a primary-key foreign-key relationship.
**** A DataRowView represents a single row of a DataView. The distinction between a DataRow and DataRowView is important when iterating over a result set.
** A DataRelation is a relationship between tables, such as a primary-key foreign-key relationship. This is useful for enabling DataRow's functionality of retrieving related rows.
** A Constraint describes an enforced property of the database, such as the uniqueness of the values in a primary key column. As data is modified any violations that arise will cause exceptions.

A DataSet is populated from a database by a DataAdapter whose Connection and Command properties have been set. However, a DataSet can save its contents to XML (optionally with an XSD schema), or populate itself from XML, making it exceptionally useful for web services, distributed computing, and occasionally-connected applications.

ADO.NET and Visual Studio.NET

Functionality exists in the Visual Studio .NET IDE to create specialized subclasses of the DataSet classes for a particular database schema, allowing convenient access to each field through strongly-typed properties. This helps catch more programming errors at compile-time and makes the IDE's Intellisense feature more useful.

Entity Framework

ADO.NET Entity Framework is a set of data access APIs for the Microsoft .NET Framework, targeting the version of ADO.NET that ships with .NET Framework 3.5. However, it will be released as an out-of-band update after both .NET Framework 3.5 and Visual Studio 2008 have shipped. An Entity Framework "Entity" is an object which has a key representing the primary key of a logical datastore entity. A conceptual "Entity Data Model" (Entity-relationship model) is mapped to a datastore schema model. Using the Entity Data Model, the Entity Framework allows data to be treated as entities independently of their underlying datastore representations.

"Entity SQL" is a SQL-like language for querying the Entity Data Model (instead of the underlying datastore). Similarly, Linq extension "Linq-to-Entities" provides typed querying on the Entity Data Model. Entity SQL and Linq-to-Entities queries are converted internally into a "Canonical Query Tree" which is then converted into a query understandable to the underlying datastore (e.g. into SQL in the case of a Relational database). The entities can be using their relationships, and their changes committed back to the datastore

See also

; Data Access Technologies & Implementation Methods
* RDBMS
* ADO (ADO vs ADO.NET)
* ODBC
* OLE DB
* XML
*Service-Oriented Modeling Framework (SOMF)

; O/R Mapping
* Object-relational mapping
* ADO.NET Entity Framework; Data Access and Synchronization
* ADO.NET Data Services
* Microsoft Codename "Jasper"
* Microsoft Sync Framework

External links

;ADO.NET
* [http://msdn2.microsoft.com/en-us/library/aa286484.aspx ADO.NET Overview on MSDN]
* [http://vb.net-informations.com/ado.net/vb.net-ado.net-tutorial.htm ADO.NET Step By Step Tutorial]
* [http://msdn2.microsoft.com/en-us/library/ms973217.aspx ADO.NET for the ADO Programmer]
* [http://www.devlist.com/ConnectionStringsPage.aspx ADO.NET Connection Strings]
* [http://blogs.msdn.com/adonet/ ADO.NET Team Blog] ;Entity Framework
* [http://msdn2.microsoft.com/en-us/library/aa697427(VS.80).aspx Entity Framework]
* [http://msdn.microsoft.com/data/default.aspx?pull=/library/en-us/dnvs05/html/ADONET_EDM.asp Entity Data Model] ;Incubation Projects
* [http://msdn2.microsoft.com/en-us/data/bb419139.aspx Data Access Incubation Projects]
* [http://astoria.mslivelabs.com/ Astoria] , [http://www.microsoft.com/downloads/details.aspx?FamilyId=1B6F85BC-8933-4D0E-A639-934EF85ADCE1&displaylang=en download]
* [http://blogs.msdn.com/adonet/archive/2007/04/30/project-codename-jasper-announced-at-mix-07.aspx Jasper] , [http://www.microsoft.com/downloads/details.aspx?FamilyId=471BB3AC-B31A-49CD-A567-F2E286715C8F&displaylang=en download]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • ADO.NET — часть фреймфорка .NET, предоставляющая доступ к данным для приложений, основанных на Microsoft .NET. Не является развитием более ранней технологии ADO, а является самостоятельной технологией. Классы ADO.NET находятся в сборке System.Data.dll… …   Википедия

  • ADO.NET — ist ein Teil der von Microsoft entwickelten .NET Plattform. Es handelt sich um eine Sammlung von Klassen, die den Zugriff auf relationale Datenbanken gewährleisten. ADO.NET gilt als Nachfolger der ActiveX Data Objects (ADO), hat aber nichts mit… …   Deutsch Wikipedia

  • Ado.net — ist ein Teil der von Microsoft entwickelten .NET Plattform. Es handelt sich um eine Sammlung von Klassen, die den Zugriff auf relationale Datenbanken gewährleisten. ADO.NET gilt als Nachfolger der ActiveX Data Objects (ADO), ist aber um… …   Deutsch Wikipedia

  • ADO.NET — El ADO.NET es un conjunto de componentes del software que pueden ser usados por los programadores para acceder a datos y a servicios de datos. Es una parte de la biblioteca de clases base que están incluidas en el Microsoft .NET Framework. Es… …   Wikipedia Español

  • ADO.NET — ActiveX Data Objects Pour les articles homonymes, voir ADO. ActiveX Data Object ou ADO est une technologie Microsoft fournissant une interface d accès aux données dans l environnement Windows. Elle permet aux programmes clients d accéder aux… …   Wikipédia en Français

  • ADO.NET Entity Framework — is an object relational mapping (ORM) framework for the .NET Framework. This framework is Microsoft s first ORM offering for the .NET Framework. While Microsoft provided objects to manage the Object relational impedance mismatch (such as a… …   Wikipedia

  • ADO.NET Entity Framework — в составе .NET Framework ADO.NET Entity Framework (EF)  объектно ориентированная технология доступа к данным, является object relational mapping (ORM) решением для .NET Framework от M …   Википедия

  • ADO.NET Data Services — (codename Astoria ) [cite web | url = http://blogs.msdn.com/data/archive/2007/12/10/ado net data services ctp released.aspx | title = ADO.NET Data Services CTP Released! | accessdate = 2007 11 12] is a platform for what Microsoft calls Data… …   Wikipedia

  • ADO.NET Data Services — (под кодовым название «Astoria»)  платформа для Microsoft Data Services, нацеленная, в первую очередь, на использование таких современных технологий, как Ajax и Silverlight. Цель ADO.NET Data Services состоит в том, чтобы представить данные… …   Википедия

  • ADO.NET — ActiveX Data Object (Computing » Software) …   Abbreviations dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”