the whole view:( Only for SQL Server 200X)
Section A :( Request of Connection )
1. Connection class ( SqlConnection, used to connect with database or data source)
Before connection , connection string is needed.
Class ConnectionStringBuilder -> connection string -> Class SqlConnection
e.g.
ConnectionStringBuilder strcon = new ConnectionStringBuilder() ;
strcon.DataSource = ...
strcon.IntegratedSecurity=True;
strcon.InitialCatalog= ...
SqlConnection cn = new SqlConnection( strcon ) ;
cn.open() ; ( or using(sqlConnection cn = new SqlConnection(strcon)){} )
...
cn.close() ;
==============
SqlConnection Class
1. ConnectionStringBuilder (create connectionString)
2. SqlTransaction Class
3. SqlDataAdapter Class
4. SqlCommand Class
===============
||
||
\/
2. Database Query( SqlCommand class and SqlDataReader , to query database or data source)
===================
SqlCommand class :
1. SqlParameter
2.SqlDataReader
===================
||
||
\/
3. Class SqlDataAdapter ( a bridge of online data and offline data )
connection -> SqlCommand->SqlDataReader ( an active connection with database )
/\
||
Class SqlDataAdapter
||
\/
Class DataSet ( Offline data manipulation )
Section B:( Offline data manipulation and processing)
1. Class DataSet
A=> Class DataTable(Class DataView) B=> Class DataColumn (Class DataRowView)
B=> Class DataRow
B=> Class Constraint
A=> Class DataRelation
No comments:
Post a Comment