What is DataSet in ADO.NET?

Question

What is DataSet in ADO.NET?

Re: What is DataSet in ADO.NET?

The DataSet is similar to an array of disconnected Recordset objects. It supports disconnected data access and operations, allowing greater scalability because you no longer have to be connected to the database all the time. DataSet is a copy of an extracted data being downloaded and cached in the client system.
The DataSet object is made up of two objects:
* DataTableCollection object containing null or multiple DataTable objects (Columns, Rows, Constraints).
* DataRelationCollection object containing null or multiple DataRelation objects which establish a parent/child relation between two DataTable objects.
What types of DataSet are there in ADO.NET?
here are two types of DataSets:
1. Typed DataSet
2. Untyped DataSet
1. Typed DataSet is derived from the base DataSet class and then uses information in an XML Schema file (.xsd file) in order to generate a new class. Information from the schema (tables, columns, and so on) is generated and compiled into this new DataSet class as a set of first-class objects and properties. Typed dataset is easier to read. It's also supported by IntelliSense in the Visual Studio Code Editor. At compile time, it has type checking so that there are less errors in assigning values to DataSet members. Therefore, using Typed DataSet has many advantages
2. Untyped DataSet is not defined by a schema, instead, you have to add tables, columns and other elements to it yourself, either by setting properties at design time or by adding them at run time. Typical scenario: if you don't know in advance what the structure of your program is that is interacting with a component that returns a DataSet.