Wednesday, February 27, 2008

Comparison of ADO .NET DataSet and ADO RecordSet

1. Number of Tables. Dataset can hold several tables which are called data tables at once. A dataset also stores relationships and constraints on the tables. For example, if a dataset contains a table about customers and another table about customers’ product, it could also contain a relationship connecting each row of the customers table with the corresponding rows of the product table. A recordset contains only the rows returned by the corresponding query. For example, if a recordset want to retrieve data from several tables, it must use a JOIN query to assemble those data into a single result table.

2. Data Navigation. In ADO you loop through the rows of the recordset using 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.

3. Minimized Open Connections. Dataset is designed to work connectionless to the original data source. You can read from a dataset without stay connected to the data source. In ADO, recordset can also provide disconnected access, but it is designed primarily for connected access.

4. Sharing Data between Applications. Transmitting a database between applications is much easier than transmitting a recordset. To transmit a disconnected recordset from one component to another, you use COM marshalling. While ADO .NET uses XML format for transmitting data between applications.

5. Richer Data Types. Dataset is in an XML format, so there is no restriction on data types. COM marshalling provides a limited set of data types (recordset is an instant of a COM object).

6. Performance. ADO .NET does not require data-type conversions. ADO, which requires COM marshalling to transmit data among components, does require the ADO data types be converted to COM data types.

7. Penetrating Firewalls. Components exchange datasets using XML, so it can pass safely over firewalls. While firewalls prevent system-level requests (such as COM marshalling) from passing.

For the complete information, please refer to MSDN – Comparison of ADO .NET and ADO

0 comments:

 

Get paid for your opinions! Click on the banner above to join Planet Pulse. Its totally free to sign up, and you can earn UNLIMITED. Find out more by visiting PLANET PULSE.
Sign up for PayPal and start accepting credit card payments instantly. http://www.emailcashpro.com
July Code Blog Copyright © 2010 Blogger Template Designed by Bie Blogger Template