Dataset Types

There are two types of datasets:

 

Untyped

Untyped datasets do not have a generated class file added to the project and can be described as shown below:

 

Runtime

  • Can have DataTables defined, but no DataColumns.

  • Metadata is determined at runtime.

  • Anything can be put into a Runtime dataset.

  • Design-time DataBinding is not realistic.

  • Filling untyped datasets from a DataAdapter works well, but from a DataReader is not realistic.

Static

  • Can have DataTables and DataColumns defined.

  • Allow you to create your own column headers. The default is to create String DataColumns, which are easily filled, but are not formatted.  

  • Design-time DataBinding is possible.

  • Filling these from a DataReader works well, but from a DataAdapter is not realistic.

 

The significance of using the Tables Collection is that it references a provider generic application data model (not the actual data store) and provides a layer of isolation. However, there is no automated method for updating if the queries that fill them change.

Dynamic

  • Include an XML schema that is used to infer the DataTables and DataColumns.

  • Columns are appropriately typed and formatted.  

  • Design-time DataBinding is possible.  

  • Filling this from a DataAdapter works well, but from a DataReader is more time-consuming.

 

PickDPDataSets are dynamic, and make use of the DataAdapterCollection to access a list of PickDPDataAdapters and their current PickDPCommands by which the provider specific schema that is used to build the Dataset can be accessed.

Typed

Extends the Untyped dataset by replacing the Tables Collection with a DataAdapters Collection. Although in many ways these are comparable collections, they have significantly different ramifications and result in different functionality.

 

  • Typed datasets have a base class added to the project from which multiple instances can be instantiated. The class has properties that expose each appropriately typed DataTable and DataColumn, making the Data Model highly re-usable.

  • Design-time DataBinding is possible.

  • Filling this from a DataAdapter works well, but from a DataReader is more time-consuming.

 

The significance of using the Tables Collection is that it references a provider generic application data model (not the actual data store) and provides a layer of isolation. The DataSet can be re-generated explicitly if the actual data store and/or queries change enough to justify updating the application data model.