Question

My program needs to start auditing saved XML data for users. Whenever the user clicks 'Save'; I'll need to insert his current data (serialized to XML) and save it somewhere. What is the better option between:

  1. Creating a text file and dropping all the xml in there. (Creating a new text file per save)
  2. Using a table in MS Access

I'm using .Net 2.0 / MS Access 2003

Was it helpful?

Solution

The benefit of using tables in any DBMS over file storage :

  • the ability to query / mine the data afterwards with queries
  • the ability to backup data transactionally

With xml files on the file system, you will need to come up with strategies for 'unique file naming' and overcome limitations of how many files you can store per folder etc.

In some RDBMS', Xml is a first class data type (unfortunately, not for MS Access), so:

  • It is possible to query your Xml using XPath, e.g. using XQuery.
  • In many RDBMS (e.g. Sql Server), it is also possible to create indexes in Xml for improved performance of the above queries.

However, in Access, you will need to store in a Memo field, with a maximum document size of 1Gb in Access 2010.

TL;DR : If you are already using a database, store the Xml in it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top