Typed Dataset
Typed datasets derive their schema (table and column structure) from .xsd files and are easier to program against
Typed Databases can be created using Data Source Configuration Wizard
A Typed Dataset is a Dataset that is first derived from the base DataSet class amd then uses information in an XSD file to generate a new class
Information from the schema (tables, columns..) is generated and compiled into this new DataSet class as a set of first class objects and properties
Because a Typed DataSet class inherits from the base DataSet class, the typed class assumes all of the functionality of the DataSet class can be used with methods that take an instance of a DataSet class as a parameter
An untyped dataset has no corresponding built-in schema
The class for a typed dataset has an object model in which its properties take on the actual names of tables and columns
Typed access is not only easier to read, but is fully supported by the IntelliSense in the Visual Studio Code Editor
Typed dataset is not recommended when schema is not available or in situations where structure of data is not static or predictable
Within a dataset, tables and column names are case insensitive, that is Customer and customer table are the same
This matches the default naming conventions of the databases where case does not differentiate the tables/columns
A strongly-typed schema is rigidly defined at compile time, while a loosely typed object, is the one whose schema is not known until runtime
DataReader and DataSet are loosely typed objects and since their schema is defined by the columns returned by the database query used to populate them
A Typed DataSet is a class generated by Visual Studio based on a database schema and whose members are strongly-typed according to this schema
The Typed DataSet itself consists of classes that extend the ADO.net DataSet, DataTable and DataRow classes
In addition to strongly-typed DataTables, Typed DataSets now also include TableAdapters, which are classes with methods for populating the DataSet’s Data Tables and propagating modifications within the Data Tables back to the database
nice blog
ReplyDelete