Synapseindia dotnet development presentation on ado net

  • Upload
    apps

  • View
    220

  • Download
    2

Embed Size (px)

DESCRIPTION

 

Citation preview

SynapseIndia DotNet development-Presentation on ADO Net

ADO.NET

ADO.NET
ADO.NET is a new, improved, and greatly expanded version of ADO that was developed for the Microsoft .NET initiativeIt incorporates all of the functionality of ADO and facilitates the transformation of XML documents to and from database dataIt uses datasets, which is an in-memory, fully-functioned, independent databases

Role of ADO.NET
ADO.NET serves as an intermediary between all types of .NET applications and the DBMS and database

Data Provider
A .NET data provider is a library of classes that provides ADO.NET servicesMicrosofts provides three data providersOLE DB data provider can be used to process any OLE DB-compliant data sourceSQLClient data provider is purpose-built for use with SQL ServerOracleClient data provider is purpose-built for use with Oracle

Data Provider Components

Data Provider Components
A connection object is similar to the OBDCs connection object A command object is created on an established connectionA data reader provides read-only, forward-only, fast access to database dataAn application can get and put data to and from the database using the command objectA dataset is an in-memory database that is disconnected from any regular database It distinguishes ADO.NET from the previous data access technology

The ADO.NET Dataset
A dataset is an in-memory database that is disconnected from any regular databaseDatasets can have Multiple tables, views, and relationshipsTables may have surrogate key (auto increment columns), primary keys, and be declared as uniqueReferential integrity rules and actionsThe equivalent of triggersDatasets may be constructed from several different databases and managed by different DBMS

Dataset Advantages
Dataset contents and its XML schema can be easily formatted as an XML documentAlso, XML schema documents can be read to create the structure of the dataset, and XML documents can be read to fill the datasetDatasets are needed to provide a standardized, non-proprietary means to process database viewsThis is important for the processing of views with multiple multi-value paths

Dataset Disadvantages
Because dataset data are disconnected from regular database, only optimistic locking can be used when updating the regular database with the datasetIn the case of conflict, either the dataset must be reprocessed or the data change must be forced onto the database, causing the lost update problemThus, datasets cannot be used for applications in which optimistic locking is problematicalInstead, the ADO.NET command object should be used