GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ASP.NET 2.0  |  Question 8 of 161    Print  
Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

  
Total Answers and Comments: 12 Last Update: April 28, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
August 12, 2005 05:11:01   #1  
arun dwivedi        

RE: Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
the difference between dataset and record set is basially connected mode and disconnected mode itmend data set is working in disconnected mode and record set is working in connected mode. so i will get alot o advantage in disconnected mode due to resource utilazation is less.....
 
Is this answer useful? Yes | No
September 01, 2005 15:40:06   #2  
anil kumar        

RE: Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

Additons to the above comment.

Using record set we will get at any time only one table from the database.


But dataset in ado.net will gets more than one table at a time.

 
Is this answer useful? Yes | No
September 06, 2005 10:12:24   #3  
Samyak R. Ranjan        

RE: Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
Since Recordset is connected there is concept of Cursor like Dynemic KeySet etc. Cursor is not available in Dataset because it is disconnected.
 
Is this answer useful? Yes | No
September 20, 2005 01:58:02   #4  
sanju        

RE: Can you explain the difference between an ADO.NET ...

Data set is based on disconnected architecture which improves perfoermance of the application.where as Recordset is based on connected architecture.We can retrieve data from different databases by using data set.but by using recordset we can retrieve data from one table.dataset is typesafe.where as recordset is not.


 
Is this answer useful? Yes | No
October 06, 2005 07:34:13   #5  
Madhuri.Ch        

RE: Can you explain the difference between an ADO.NET ...
actually there is an option to make the recordset as disconnected.but as in dataset it is not a default setting.moreover a recordset can be used for retrieving as well as for updating from the database but in a dataset u can achieve updating the database values thru a dataadapter.
 
Is this answer useful? Yes | No
October 06, 2005 07:36:20   #6  
Madhuri.Ch        

RE: Can you explain the difference between an ADO.NET ...
actually there is an option to make the recordset as disconnected.but as in dataset it is not a default setting.moreover a recordset can be used for retrieving as well as for updating from the database but in a dataset u can achieve updating the database
 
Is this answer useful? Yes | No
October 26, 2005 16:42:01   #7  
Ranjit Member Since: October 2005   Contribution: 18    

RE: Can you explain the difference between an ADO.NET ...

You can understand the features of ADO.NET by comparing them to particular features of ActiveX Data Objects (ADO).

In-memory Representations of Data

In ADO the in-memory representation of data is the recordset. In ADO.NET it is the dataset. There are important differences between them.

Number of Tables

A recordset looks like a single table. If a recordset is to contain data from multiple database tables it must use a JOIN query which assembles the data from the various database tables into a single result table.

In contrast a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically they are DataTable objects. If a dataset contains data from multiple database tables it will typically contain multiple DataTable objects. That is each DataTable object typically corresponds to a single database table or view. In this way a dataset can mimic the structure of the underlying database.

A dataset usually also contains relationships. A relationship within a dataset is analogous to a foreign-key relationship in a database that is it associates rows of the tables with each other. For example if a dataset contains a table about investors and another table about each investor's stock purchases it could also contain a relationship connecting each row of the investor table with the corresponding rows of the purchase table.

Because the dataset can hold multiple separate tables and maintain information about relationships between them it can hold much richer data structures than a recordset including self-relating tables and tables with many-to-many relationships.

Data Navigation and Cursors

In ADO you scan sequentially through the rows of the recordset using the ADO MoveNext method. In ADO.NET rows are represented as collections so you can loop through a table as you would through any collection or access particular rows via ordinal or primary key index. DataRelation objects maintain information about master and detail records and provide a method that allows you to get records related to the one you are working with. For example starting from the row of the Investor table for Nate Sun you can navigate to the set of rows of the Purchase table describing his purchases.

A cursor is a database element that controls record navigation the ability to update data and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object but instead includes data classes that provide the functionality of a traditional cursor. For example the functionality of a forward-only read-only cursor is available in the ADO.NET DataReader object. For more information about cursor functionality see Data Access Technologies.

Minimized Open Connections

In ADO.NET you open connections only long enough to perform a database operation such as a Select or Update. You can read rows into a dataset and then work with them without staying connected to the data source. In ADO the recordset can provide disconnected access but ADO is designed primarily for connected access.

There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter SqlDataAdapter OdbcDataAdapter or OracleDataAdapter object) which makes calls to an OLE DB provider or the APIs provided by the underlying data source. The important difference is that in ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database by optimizing for performance performing data validation checks or adding any other extra processing.

Note Data adapters data connections data commands and data readers are the components that make up a .NET Framework data provider. Microsoft and third-party providers can make available other .NET Framework data providers that can be integrated into Visual Studio. For information on the different .NET Data providers see .NET Data Providers.

Sharing Data Between Applications

Transmitting an ADO.NET dataset between applications is much easier than transmitting an ADO disconnected recordset. To transmit an ADO disconnected recordset from one component to another you use COM marshalling. To transmit data in ADO.NET you use a dataset which can transmit an XML stream.

The transmission of XML files offers the following advantages over COM marshalling:

Richer data types

COM marshalling provides a limited set of data types those defined by the COM standard. Because the transmission of datasets in ADO.NET is based on an XML format there is no restriction on data types. Thus the components sharing the dataset can use whatever rich set of data types they would ordinarily use.

Performance

Transmitting a large ADO recordset or a large ADO.NET dataset can consume network resources; as the amount of data grows the stress placed on the network also rises. Both ADO and ADO.NET let you minimize which data is transmitted. But ADO.NET offers another performance advantage in that ADO.NET does not require data-type conversions. ADO which requires COM marshalling to transmit records sets among components does require that ADO data types be converted to COM data types.

Penetrating Firewalls

A firewall can interfere with two components trying to transmit disconnected ADO recordsets. Remember firewalls are typically configured to allow HTML text to pass but to prevent system-level requests (such as COM marshalling) from passing.

Because components exchange ADO.NET datasets using XML firewalls can allow datasets to pass


 
Is this answer useful? Yes | No
September 07, 2006 03:18:54   #8  
Rahul        

RE: Can you explain the difference between an ADO.NET ...
DatSet has its own schema definition whereas Record Set doesnt have.
 
Is this answer useful? Yes | No
April 16, 2007 07:57:07   #9  
Mukesh        

RE: Can you explain the difference between an ADO.NET ...
Dataset is a connectionless data holder whereas RecordSet is connection oriented Data holder.Though DataSet you can refer more than 1 table at a time but in the case of Recordset only 1 table is processed at a time. Through Dataset you can process more than 1 record but in case of recordset recordset you have to make travesel to each record and after that you can make processing.
 
Is this answer useful? Yes | No
May 08, 2007 02:56:31   #10  
Dheeraj Saxena        

RE: Can you explain the difference between an ADO.NET ...
ADO.NET is the enhancement of ADO so I can't comment on ADO like it is a bad approach or we should prefer dataset
and all rather what I think is what actually your project need is important.

ADO provides the ultimate connected environment means your transaction is very much safe to the others but DataSet is the beauty of .NET datastreaming it works on disconnected approach but most important drawback is data is not updated on the server all the time it may lead to the data
inconsistency it is the major issue working with dataset. But disconnected environment is much better and provides a flexibility to work with XML Data and Marshelling.


Thanks
Dheeraj


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape