Should I use XML as a database for a standalone app?

  • Thread starter Thread starter Jim Florence
  • Start date Start date
J

Jim Florence

Hi,

I've just started work on a project where I need to have a tool to allow
people to work offline and then sync data back to a main database when they
come back onshore.

It's a basic app that would allow people to enter timesheet data, record
maintenance on offshore kit and raise requisitions.

I had the idea of exporting the necessary data from the main database as XML
files, using these as a mini database and the writing a procedure to take
the data back in the files at the end of a job.

I've had a quick look at this and have bits working but before I go too far
down the path I was hoping for a sanity check. And any pointers as how to
handle the XML data best in windows forms/grids

Many Thanks

Jim Florence
 
Really depends on the volume of Data, if it is small scale, then you are
fine. You don't have much options to load XML files faster.. so beware of
the size before deciding on XML for local files..

Vijay
 
General considerations :

1. Requirement : High interoperability.
Best option - XML

2. Requirement : High speed, performance.
Best option - Databases.

3. Requirement : Large size updates, database.
Best option - Databases.

4. Requirement : Small updates, network based.
Best option - XML

In your case, I think XML based updates to a main SQL Server database
seem like the best bet.

Regards,

Cerebrus.
 
Jim,

Your question is exactly were AdoNet and datasets are made for.

There are more and more disconnected data in the world, think for that on
PDA, webservices, and more stuff.

Every Dataset, even in a PC connected in a network, works disconnected.
Therefore you can save it at any point to any media. For the last you need
to write it with the extra parameter "DiffGram" as long as you don't save
it, by instance on a PDA, you have the same effect of course.

Be aware that the writeXML does not check if the file already exist and if
that stops while writing (power failure) you will lost everything if you
don't make a procedure to prevent that. Therefore I advice you to create at
least a mechanisme as FileCurrent and FilePrevious.

http://msdn.microsoft.com/library/d...tml/frlrfsystemdataxmlwritemodeclasstopic.asp

I hope this helps,

Cor
 
Cor, Vijay, Cerebrus,

Thanks very much for your extremely helpful replies. The idea at least is
sound now I just need to work out how to do it. :0)

There seems to be a real lack of example code for winforms(non asp) xml for
vb.net, does anyone know of any good places where I can get some grounding
on this ?

Many thanks again

Jim
 
Back
Top