In-Memory Representations of Data
In-Memory Representations of Data
In-Memory Representations of Data
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.
The transmission of XML files offers the following advantages over COM marshalling:
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.
advantage of it is that there exist various providers with which you can query not only
databases but also other data sources such as XML, objects or DataSets. If you
want to learn more about LINQ check out our previous tutorials.
Here is a list of main differences between ADO and ADO.NET :
ADO.NET uses disconnected models based on messages whereas ADO is
rather connection oriented
ADO.NET supports XML in an easy and clear way, moreover it uses XML for
passing data. On the other hand standard ADO uses binary representation
for passing data.
ADO is based on COM (Component Object Model) and ADO.NET uses CLR
(Common Language Runtime)
Recordset in ADO and DataSet in ADO.NET