The reason you should use a database is contained in your message:
"This
[quoted text, click to view] > database can also be created by our customers and weshould be able to use
> it."
They might want to use something other than an XML file.
I was faced with a similar situation recently. I had to get data from a
database. However, it was possible to create backups of portions of that
database as an XML file, and the customer wanted to manipulte, view, and
otherwise deal with that XML file just as they did the main database.
My solution was to convert everything to a dataset. All of my manipulations
and viewing of the information was done from a dataset. Then, I had a
"FromSource" and a "ToDestination" function. "FromSource" would read
information from a source and populate the dataset. "ToDestination" took the
dataset and sent it to the destination.
"ToDest" looked something like this:
switch(destinationselected)
{case PossibleDestinations.XMLFile: ds.WriteXML(myfilename);break;
case PossibleDestinations.BackToTheDatabase: mydataadapter.update(ds); break;
}
As for sample applications with large records, write one:
for (i=1;i<10000;i++)
{//Insert a new record into the dataset.
}
ds.WriteXML();
I've done it. Don't open the resulting XML file using Internet Explorer
unless you have a very fast machine. You might be waiting a while.
[quoted text, click to view] "Hari Shankar" wrote:
> Dear all
> I have to develop a database independent application in c# 2003. It means
> the underlying database should be anything like ACCESS, Oracle or SQL and my
> application should not get affected if i change between databases. i also
> have a requirement of storing 10,000 user records in my database. This
> database can also be created by our customers and weshould be able to use
> it.
> After reading ADO.NET i felt convinced that it is the solution for my
> requirement. But later i was thinking when i want to create a database
> independent application why i should use a database first of all, instead i
> can use XML.
>
> The following are the points supporting it.
> 1. XML universally accepted/standardized.
> 2. No hassle of connection to a database server, changing the DB adapters,
> customers having different databases facing problems in entering the data
> 3. Easily transferable and portable. Anybody can edit an XML file as there
> are lot of freeware available.
>
> The following are the points opposing it
> 1. Performance of parser while supporting 10,000 user records
> 2. Is it wise to think XML can be used in this way?
>
> Please help me out. Also from where can i get a sample c# applications
> storing the large user data (10,000 records) in XML file
>
>