DataSet


  1. A Dataset is an In-Memory object or memory representation of the data
  2. Dataset will work with disconnected architecture
  3. Data set stores the data temporarily within the application so that can be used within the application.
  4. A Dataset can be either Typed or UnTyped.
  5. When working with Dataset it is not require establishing the prior connection to the database
External Architecture:-
  • Dataset does not know how to interact with database so Dataset will use Data Adapter object to interact with database.
  • Data Adapter will perform following tasks.
  • Gets the Data from database and fill into Dataset.
  • Update the Dataset data back to DataBase.
  • Data Adapter will use command object internally to interact with DataBase.




  • Data Adapter will use Select Command (A Command Object with Select Query) to fetch the data from the DataBase and to fill into Dataset, at the time of request connection to the database is automatically established and once data is filled into the Dataset connection is automatically closed.
  • to fetch the data from the DataBase and to fill into Dataset, at the time of request connection to the database is automatically established and once data is filled into the Dataset connection is automatically closed.
  • User interacts with Dataset Data ,after completion of the user interaction Dataset data can be updated to the database using Insert,Update and Delete commands of the Data Adapter.

Internal Architecture of Dataset:-
Internally Dataset will store the Data in the form of collection.

  • Dataset will maintain two Collections internally
  • Tables Collection
  • Relations Collection
  • Every table will have their collections again 
  1. Rows Collectio
  2.  Columns Collection
  3.  Constraints Collection


  • Single Dataset contain any Number of tables with in the Tables Collection and any Number of relations with in Relation Collection.
  • There is no limit for number of tables and relations with in the single dataset as long as memory is available we can store the number of tables and relations.
  • The structure of a Dataset is similar to that of a relational database .It is a hierarchical object model of Tables, Rows, Coloumns, Constraints, and Relationships.

If we consider that there are two tables available in Dataset named Ds like in the Figure Below.


Identification of Tables in Dataset 

 As tables are store in the form of collection each table can be identified using index value or table name like



Identification of Rows in Dataset Table:-

As Every table will contain collection of rows each row can be identified using index value like

Identification of columns in Dataset Table:- 

as every table will contain collection of columns can be identified using index value or column value like
 




Identification of Cells or Cell Data:- 

A cell or cell data within the Dataset table is identified using Matrix notation like:-

 

No comments:

Post a Comment