| [Edit]

|
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 perceived as an entirely new product.
|
top
Architecture
ADO.NET consists of two primary parts:
top
Data provider
The provider objects. These classes provide access to and communicate with a data source, such as a Microsoft SQL Server database. Each data source has its own set of provider objects, but they each have a common set of suffixes:
Connection: Provides a connection to the data source, needed to access it. 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: An object used to efficiently process a large list of results one record at a time without storing them..
top
DataSet
The DataSet objects, a group of classes describing a simple in-memory relational database. There is only one, data-source-neutral, set of DataSet objects, but both data and database schema structure can be imported from other data sources with -DataAdapter objects. The classes form a containment hierarchy:
A DataSet object represents an entire database. 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 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 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.
top
Sources of ADO.NET Providers
Microsoft ships providers for a few databases and a Bridge to ODBC drivers for use with the Microsoft CLR, on Windows
Simba Technologies ships SimbaEngine SDK, a software development kit for building custom ODBC/JDBC drivers and ADO.NET data providers for any relational and non-relational proprietary databases.
DataDirect Technologies ships 100% managed providers that are for the primary corporate databases (Oracle, Sybase, DB2, Microsoft SQL Server, Progress RDBMS)
OpenLink Software ships providers for a number of target databases, including Bridges to other data access mechanisms, for use with either the Microsoft or Mono CLR implementations, on Windows.
top
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.
top
ADO Vs. ADO.NET
A useful discussion of the shift from ADO to ADO.NET may be found in the MSDN article ADO.NET for the ADO Programmer.
top
Entity Framework
The Entity Framework is a set of data access APIs for the Microsoft .NET Framework, to be included with a future version of ADO.NET. 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 modified, navigatated using their relationships, and their changes committed back to the datastore.
top
See also
|
|