locked
Best Practice to Save User Data ? RRS feed

  • Question

  • I'm working on online CRM type of an application where there is a lot of data involved and multiple accounts with different users and different access levels. What is the best way to store all the data ? XML or Database ? Can someone please explain.

     

    Thanks,

    Harsimrat

    Tuesday, June 19, 2007 11:03 PM

Answers

  • Database is much easier.

    XML Cons

    1. You are not deal with file system. You need to manage file locks. If you have large amount of data you need to deal with lists of files;
    2. Performance is less predictable.  XML for example can be fast on small data, but slow on large;
    3. Ability to scale.  For example you start with application that does not plan to use large data, and you choice is single XML file. Then you application grows, and data grows too. And when you want to split data on the chunks it can lead to really hard upgrade;
    4. If your choice is multiple files you will not be able to query them as one (you are able to use XInclude or some hacks);
    5. Tool support is worse;
    6. Edit and Delete are out of the supported query languages, so you will need more code to achieve this. This is not true for XLinq, however I cannot recommend to use XLinq at the present time.

    XML Pros

    1. Powerful query language;
    2. Performance on the small files is great;
    3. Support for data transformations, this is nothing in databases that can concurrent with XSLT;
    Wednesday, June 20, 2007 11:02 AM