Ryan,
I would use the CSV. The only reason I would use XML is if you had a
need for heiarchical data structures, and/or needed to query the data in
some way (through XPath, XQuery).
However, since you don't need either of those things, I think that a CSV
file would be better. Also, since mysql has an import/export feature using
CSV files (SQL Server has this as well) which is fast, it would aid your
development, since you don't have to code against bringing XML into your app
then dumping it into your tables. You could just issue the command and be
done with it.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mvp@spam.guard.caspershouse.com
"Ryan Liu" <ad50275324@online.sh.cn> wrote in message
news:e6MnCayfGHA.4304@TK2MSFTNGP05.phx.gbl...[color=blue]
>I have an application need export ane import data of projects. There are
> about 10 database tables releated to one project. 3 of them each could
> have
> up to 100K lines data.
>
> I can export all data out into a xml file and then zip it. When I do
> import,
> I parse this xml file and then insert into database myself.
>
> Or I can export all tables out in csv format and then use mysql's client
> command "load local file" (which is claimed very fast command).
>
> I have keep thinking which is best choice. Will Using XML format to import
> consume too much momory and what are best way(classes, API in C#) to use
> xml?
>
> Use csv file, size should be smaller, and mysql client tool is fast. But
> not
> so portable and when I can not show a progress bar while doing import ...
>
> Can some experts comment on this?
> Thanks!
> Ryan
>
>[/color]