先做事后做人

博客园 首页 新随笔 联系 订阅 管理

ADO.NET overview (2)

4.ADO.NET DataSet
The DataSet object is central to supporting disconnected,distibuted data scenarios with ADO.NET.It is a memory-resident representation of data that provides a consistent relational programming model regardless of data source.It can be used with multiple and differing data source,with XML data,or to manage data local to the application.
(1)DataSet object model
picture
The DataSet can also persist and reload its contents as XML,and its schema as XML Schema definition language(XSD)schema.

(2)The DataTableCollection
An ADO.NET DataSet contains a cllection of zero or more tables represented by DataSet object.The DataSetCollection contains all the DataTable objects in a DataSet.
A DataTable is defined in the System.Data namespace and represents a single table of memory-resident data.
A DataTable contains a collection of columns represented by a DataColumnCollection , constraints represents by ConstraintCollection,which together definie the schema of the table.A DataTable also contains a collection of rows represented by DataRowCollection,which contains the data in the table.Along with its current state,a DataRow retains both its current and original versions to identify changes to the value stored in the row.

(3)The DataRelationCollection
A DatSet contains relationships in its DataRelationCollection object.A relationship.represented by the DataRelation object,associates rows in one DataTable with  rows in other DataTable. A DataRelation identifies matching columns in two tables of a DataSet.
Relationships enable navigation from one table to another within a DataSet.The essential elements of a DataRelation are the name of the relationship,the name of the tables being related,and the relation columns in each table.Relationship can be bulit more than one columns in each table.

(4)ExtendedProperties
The DataSet,DataTable,and DataColumn all have ExtendedProperties property.ExtendedProperties is a PropertyCollection where you can palce custom information,such as SELECT statement that was used to generate the result set,or the time when the data was generated.It is persisted with the schema information for the DataSet.

5.Side-by-Side Execution and ADO.NET
Side-by-side excution in the .NET Framework is the ability to excute in a computer wich have mulitiple versions of the .NET Framework installed,only used the currectly version which it comlied for.

Forward Compatbility and Backward Compatibility.
Forward compatbility means that application can be compiled with an earlier version but also will run in the backward version successfully.
Backward compatibility means that application compiled with a newer version,it also can run in the eariler version functionallity.of course for the features introduced in the new version

The following sections describe side-by-side execution issues that can affect the backward or forward compatibility of your ADO.NET code including:
  The .NET Framework Data Provider for ODBC
  The .NET Framework Data Provider for Oracle
  Code Access Security
  The DataSet
  SqlCommand execution
  Microsoft Data Access Components (MDAC)

6.ADO.NET Sample Application
see the MSDN.

 

 

posted on 2006-03-15 14:20  asdfasdf  阅读(174)  评论(0编辑  收藏  举报