Link to home
Start Free TrialLog in
Avatar of forexinfo1
forexinfo1

asked on

ASP.Net Application

Hi Experts,

I am developing an ASP.net 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.
Avatar of MilanKM
MilanKM

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
---------------------------------------------------------------
http://www.rpbourret.com/xml/XMLAndDatabases.htm
http://www.coursesbywire.com/approach-standards.html

See how XML acts as Database:~
http://www.25hoursaday.com/StoringAndQueryingXML.html

Hope this helps
MilanKM
Avatar of forexinfo1

ASKER

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
continued...

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:~ http://aspnet.4guysfromrolla.com/articles/071702-1.aspx

Hope it will help u a bit
MilanKM
ASKER CERTIFIED SOLUTION
Avatar of Fahad Mukhtar
Fahad Mukhtar
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
See some interesting links below...

How Do I...Load a DataSet with XML?
------------------------------------------
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/LoadDataSetXMLData.aspx
How Do I...Infer DataSet mappings from XML?
----------------------------------------------------
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/DataSetMapXMLData.aspx

How Do I...Save a DataSet as XML?
----------------------------------------
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/SaveDataSetXML.aspx

Thanks
MilanKM
>> "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
http://www.topxml.com/sqlxml/sqlxml_performance.asp

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.

Thanks
MilanKM
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?