ASP.Net Application

Hi Experts,

I am developing an Web application using VS.Net 2003 and SQL Server 2000, I have informed that using XML to get and save data to the database makes the data transferring faster; I am usually using Record set to save and retrieve data from the database.

I need to know what the best way to use. The XML? Or the Dataset? Or normally using Record set? And what the difference between each of them and what does each of them effecting my application.

Your advice is really appreciated.
Who is Participating?
Fahad MukhtarConnect With a Mentor Distinguished EngineerCommented:
for performance point of view.. SqlDataReader if fastest of all
XML documents may be called database only in some sort of term sense. Simply you can say a collection of data. Many such ways XML has no different from any other file, like txt, xls or anything that holds data. As database, XML has some advantages, likely, this is is self-describing, it is portable (Unicode), and it can describe data in tree or graph structures. Although it has some drawbacks, as due to parsing & text conversion the access speed is quite slow compared to other databases.

But in you case I think using database like MySQL will be a better idea. First of all the speed concern. Secondly, XML is mainly in data-centric application XML used for inter-transferring of data between the database & application.

See following links which may be helpful in this concern

See how XML acts as Database:~

Hope this helps
forexinfo1Author Commented:
Dear Mr. MilanKM,

Thank you for you reply,

but the performace is so important to me, i will use the SQL Server 2000 as a Database, but wanna know if should use direct connection to the database using record set, or use the XML -or dataset- to be my intermediary between the web application and the SQL database.

Thanks in Advance
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Where as a DataSet represents a memory cache of data. Which is as a collection of tables and relationships between those tables. This is in practically a local cached database. It provides a disconnected cache of data as a message, that enables dealing with chunks of data. DataSet has no knowledge where the data came from, may it have come from a file, a database connection, or from a stream. A DataSet provides a relational view onto this stored data.

However DataSet also can be work with XMLDataDocument. See the following link how it works:~

Hope it will help u a bit
See some interesting links below...

How Do I...Load a DataSet with XML?
How Do I...Infer DataSet mappings from XML?

How Do I...Save a DataSet as XML?

>> "SQL Server 2000 as a Database, but wanna know if should use direct connection to the database using record set, or use the XML -or dataset- to be my intermediary between the web application and the SQL database"

See the link below with a SQLXML Benchark, may be it will give u some light

Here is a quick shot of the performace

Query Technique                          Relative Performance
-------------------                          -------------------------
FOR XML AUTO (SQLXML)             100%
FOR XML AUTO (SQLClient)           102%  
Xpath                                          150%
DataSet (WriteXml)                      157%
DataSet (Explicit)                          145%
Here you can see the performace of DataSet with XML is heighest, followed by explicit DataSet.

forexinfo1Author Commented:
What about

"for performance point of view.. SqlDataReader is fastest of all"?

is using SQLDataReader will be faster than using XML and Dataset Between the Application and the database?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.