By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,456 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,456 IT Pros & Developers. It's quick & easy.

saving data to xml

P: n/a
hi,
i am writing a program that is supposed to create a database of my music
and albums.
i want it to consist of 3 'modules' input<->processing<->output. input
should enable reading data from cd or mysql db or xml, output should save
data to xml/mysql.
since im a total xml/.net/c# newbie i would like to know is XML suitable
for storing data?(database would include such information as album title,
artist, genre, and so on). Is there a way to universally 'connect' data
from xml and mysql(or other DB) source?datagrid?
What would you suggest? ;)

Nov 15 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
XML would start squeaking as it gets bigger, because eventually you're going
to store it in a file, and then loading and parsing that file may take a
long time (and a lot of resources) as your file gets bigger.

In general, if you're doing DB work, use a DB. MySQL would be just fine for
that purpose. If you're not going over 300K records, even ms-access would do
(and then you get the benefit of a portable file that is your DB).

XML would be completely unscalable for that purpose, and I'm guessing
performance-wise a DB would also be faster.

Hope this helps.

--itai
"adrin" <ad************@interia.pl> wrote in message
news:Xn*******************@193.110.122.80...
hi,
i am writing a program that is supposed to create a database of my music
and albums.
i want it to consist of 3 'modules' input<->processing<->output. input
should enable reading data from cd or mysql db or xml, output should save
data to xml/mysql.
since im a total xml/.net/c# newbie i would like to know is XML suitable
for storing data?(database would include such information as album title,
artist, genre, and so on). Is there a way to universally 'connect' data
from xml and mysql(or other DB) source?datagrid?
What would you suggest? ;)

Nov 15 '05 #2

P: n/a
XML is more appropriate for formatting the data for transportation between
your modules. And for eating up Internet bandwidth... But that's a
different topic.

Dale

"adrin" <ad************@interia.pl> wrote in message
news:Xn*******************@193.110.122.80...
hi,
i am writing a program that is supposed to create a database of my music
and albums.
i want it to consist of 3 'modules' input<->processing<->output. input
should enable reading data from cd or mysql db or xml, output should save
data to xml/mysql.
since im a total xml/.net/c# newbie i would like to know is XML suitable
for storing data?(database would include such information as album title,
artist, genre, and so on). Is there a way to universally 'connect' data
from xml and mysql(or other DB) source?datagrid?
What would you suggest? ;)

Nov 15 '05 #3

P: n/a
Please read about Web Service SQL Server and Data Set..

In the same time not to be forgotten that only XMLDocument class load the
whole XML file into memory before it execute a method. You have fast readers
like XMLTextReader, XMLReader etc for sequencial reading..

Nirosh.

"adrin" <ad************@interia.pl> wrote in message
news:Xn*******************@193.110.122.80...
hi,
i am writing a program that is supposed to create a database of my music
and albums.
i want it to consist of 3 'modules' input<->processing<->output. input
should enable reading data from cd or mysql db or xml, output should save
data to xml/mysql.
since im a total xml/.net/c# newbie i would like to know is XML suitable
for storing data?(database would include such information as album title,
artist, genre, and so on). Is there a way to universally 'connect' data
from xml and mysql(or other DB) source?datagrid?
What would you suggest? ;)

Nov 15 '05 #4

P: n/a
Cor
Hi Adrin,

You can do it, but keep this in mind.

It is always a single user approach.

You are reading and writing the dataset as one file in memory, if your
computer crashes you loose the updates done after the last writing (and the
approach allows not very much writing back).

When you write back, you have to use a very secure method, because when you
get an error in between, you loose all your data, so a tempery file is the
least you have to make.

You can use for it,
dataset.readxml(path)
dataset.writexml(path)

The performance will be probably, when it is a small databass better than
with a real database.
When it becomes a hugh database the performance of a real database will be
better.

My biggest disadvantage against it, that it is insecure because a user can
delete that XML dataset on disk by accident.

Just my thought about it.

Cor
i am writing a program that is supposed to create a database of my music
and albums.
i want it to consist of 3 'modules' input<->processing<->output. input
should enable reading data from cd or mysql db or xml, output should save
data to xml/mysql.
since im a total xml/.net/c# newbie i would like to know is XML suitable
for storing data?(database would include such information as album title,
artist, genre, and so on). Is there a way to universally 'connect' data
from xml and mysql(or other DB) source?datagrid?
What would you suggest? ;)

Nov 15 '05 #5

P: n/a
adrin <ad************@interia.pl> wrote in
news:Xn*******************@193.110.122.80:

thanks all of you for help and advice, im going to try those ideas :)
Nov 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.