Thursday, 8 August 2013

ADO.NET Architecture

Short note on: ADO.NET Components. -OR- Short note on: ADO.NET Architecture.

ADO.NET Architecture provides the connected objects and disconnected objects.

ADO.NET Architecture has two major components:

  • Data Provider (Connected objects or connection oriented objects)
  • Dataset (Disconnected objects or connectionless objects)
  1. Data Provider:

    The .NET Data Provider provides mechanism to manipulate data of Database Server.

    Data Provider is responsible for the connection to Database and managing that connection.

    The resultant data may be used directly, passed to Dataset or remotes between the tiers of the application.

    Advantage of Data Provider are,

    • Lightweight
    • High performance
    • Create minimal layer between Data Source and Code

    Various data providers included in the .NET Framework are,

    • SQL Server
    • OLEDB
    • ODBC
    • Oracle

    There are four core objects of .NET Framework Data Provider.

    • Connection
    • Command
    • Data Adapter
    • Data Reader
  2. Dataset:

    Dataset object is centralized to ADO.NET architecture to support disconnected and distributed data scenarios.

    Dataset object is used to manage the data of Data Source locally.

    Dataset can be used with the multiple and different data sources or even with the XML data also.

    Dataset has two components:

    • DataTableCollection
    • DataRelationCollection
    1. DataTableCollection

      DataTableCollection contains all the DataTable objects in a Dataset.

      DataTable contains the collection of,

      • Row
      • Column
      • Constraint
    2. DataRelationCollection

      A relationship associates rows in one DataTable with the rows in other DataTable.

      The elements of DataRelation are,

      • Name of the relationship
      • Name of the tables being related
      • Related column in each table

No comments:

Post a Comment