Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / September 2004

Tip: Looking for answers? Try searching our database.

Database Independent aplication using XML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hari Shankar - 29 Sep 2004 09:04 GMT
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
David - 29 Sep 2004 15:41 GMT
The reason you should use a database is contained in your message:

"This
> 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.

> Dear all
> I have to develop a database independent application in c# 2003. It means
[quoted text clipped - 21 lines]
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.