What is the Difference between Dataset and Datareader?

Answers were Sorted based on User's Feedback



What is the Difference between Dataset and Datareader? ..

Answer / khawar rizvi

DataReader
Datareader is like a forward only recordset. It fetches one
row at a time so very less Network Cost compare to DataSet
(Fetches all the rows at a time). DataReader is readonly so
we cannot do any transaction on them. DataReader will be
the best choice where we need to show the data to the user
which requires no transaction ie reports. Due to DataReader
is forward only we cannot fetch the data randomly. .NET
Dataproviders optimizes the datareaders to handle the huge
amount of data.

DataSet
DataSet is always a bulky object that requires lot of
memory space compare to DataReader. We can say the dataset
as a small database coz it stores the schema and data in
the application memory area. DataSet fetches all data from
the datasource at a time to its memory area. So we can
traverse through the object to get required data like
qureying database.

The dataset maintains the relationships among the
datatables inside
it. We can manipulate the realational data as XML using
dataset.We can do transactions (insert/update/delete) on
them and finally the modifications can be updated to the
actual database. This provides impressive flexibility to
the application but with the cost of memory space. DataSet
maintains the original data and the modified data
seperately which requires more memory space. If the amount
of data in the dataset is huge
then it will reduce the applications performance
dramatically.

The following points will improve the performane of a
dataset...

1. Don't use the commandbuilder to generate the sql
statements.
Though it reduces the development time the query generated

by the command builder will not be always as required. For
example
To update the details of an author table the command

Is This Answer Correct ?    45 Yes 10 No

What is the Difference between Dataset and Datareader? ..

Answer / manikandan

Datareader is forward and read only recordset in which the
data manipultions are cant carried. but dataset is the
miniature of database in which the datas can be accessed
randomly and data manipulations can be carried

Is This Answer Correct ?    43 Yes 11 No

What is the Difference between Dataset and Datareader? ..

Answer / anitha

Dataset is cache of records retrieve from data source.
Datareader is used to retrieve data from datasource.

1.Using Datareader we can read the data readnly,forwordonly
basis.
2.Only one record in a memmory at a tme
3.Faster
4.Doesnot hold any data
5.Data can not be transfer to datasource
Wher as in Dataset
1. we can read and write and allow us to navigate through
the records forword and backwords.
2.Pulls the records from the datasource and saves in IIS
memmory.
3.Slower
4.Holds datatables and has the information about
relationship between those tbes.
5.Data can be transfer to datasource

Is This Answer Correct ?    34 Yes 5 No

What is the Difference between Dataset and Datareader? ..

Answer / sudheendra

DataReader
Datareader is like a forward only recordset. It fetches one
row at a time so very less Network Cost compare to
DataSet(Fetches all the rows at a time). DataReader is
readonly so we cannot do any transaction on them. DataReader
will be the best choice where we need to show the data to
the user which requires no transaction ie reports. Due to
DataReader is forward only we cannot fetch the data
randomly. .NET Dataproviders optimizes the datareaders to
handle the huge amount of data.

DataSet
DataSet is always a bulky object that requires lot of memory
space compare to DataReader. We can say the dataset as a
small database coz it stores the schema and data in the
application memory area. DataSet fetches all data from the
datasource at a time to its memory area. So we can traverse
through the object to get required data like qureying database.

The dataset maintains the relationships among the datatables
inside
it. We can manipulate the realational data as XML using
dataset.We can do transactions (insert/update/delete) on
them and finally the modifications can be updated to the
actual database. This provides impressive flexibility to the
application but with the cost of memory space. DataSet
maintains the original data and the modified data seperately
which requires more memory space. If the amount of data in
the dataset is huge
then it will reduce the applications performance dramatically.

The following points will improve the performane of a dataset...

1. Don't use the commandbuilder to generate the sql statements.
Though it reduces the development time the query generated

by the command builder will not be always as required. For
example
To update the details of an author table the command

Is This Answer Correct ?    5 Yes 0 No

What is the Difference between Dataset and Datareader? ..

Answer / gaurav

For best answer click here
http://intquesans.blogspot.com/2011/05/difference-between-dataset-and.html

Is This Answer Correct ?    4 Yes 0 No

What is the Difference between Dataset and Datareader? ..

Answer / vasudha.g.n

DataReader
Datareader is like a forward only recordset. It fetches one
row at a time so very less Network Cost compare to DataSet
(Fetches all the rows at a time). DataReader is readonly so
we cannot do any transaction on them. DataReader will be
the best choice where we need to show the data to the user
which requires no transaction ie reports. Due to DataReader
is forward only we cannot fetch the data randomly. .NET
Dataproviders optimizes the datareaders to handle the huge
amount of data.

DataSet
DataSet is always a bulky object that requires lot of
memory space compare to DataReader. We can say the dataset
as a small database coz it stores the schema and data in
the application memory area. DataSet fetches all data from
the datasource at a time to its memory area. So we can
traverse through the object to get required data like
qureying database.

Is This Answer Correct ?    8 Yes 7 No

What is the Difference between Dataset and Datareader? ..

Answer / khaja

Datareader is readonly so we can't do any transactions on
database,in case of dataset we can perform all transctions
on database like update,insert,delete.
And also datareader access only one record at a time in
forwode only,incase of dataset we can access bulck of data
in random mode.

Is This Answer Correct ?    5 Yes 6 No

Post New Answer

More VB.NET Interview Questions

hello dear friends my problem is that i want to save images that is pictures in SQL server using vb.net can any body help me to do so please

1 Answers  


how many server controls are presented in vb.net

2 Answers  


What is the Common Language Runtime?

10 Answers   Ksb,


What is the use of errorprovider control?

0 Answers  


Explain how does the xmlserializer work?

0 Answers  






What is a static variable?

1 Answers  


What is the significance of delegates. Where should they be used?

0 Answers  


how to save items in gridview and the form name is vendor rating?

1 Answers  


Why do we use ansi keyword?

0 Answers  


How many languages are supported by .net?

0 Answers  


What is the difference between Dataset and Recordset?

7 Answers   IG, Silicon,


What is the differences between dataset.clone and dataset.copy?

0 Answers  


Categories