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

Which class allows an element to be accessed using unique key?

0 Answers  


How to store decimal data in .net?

0 Answers  


What is strong typing and weak typing?

0 Answers  


What do you mean by serialization and deserialization?

0 Answers  


Explain cls?

0 Answers  






So you know which dll is used for microsoft .net run time?

0 Answers  


Write a program that accepts an array of numbers, and two numbers (an element and a position in the array) and inserts the given element into nth position of the array.

2 Answers  


what r the properties should be given to set method?

2 Answers   PSI Data Systems,


Explain how to store decimal data in .net?

0 Answers  


what is interface and when it is used?

0 Answers  


how to send data to exe file? my code has a button when i press it, an exe file will open. how can i send data as input to the exe file?

2 Answers  


Explain about the performance of visual basic?

0 Answers  


Categories