Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

XML Vs Database

Options
  • 13-01-2007 4:37pm
    #1
    Registered Users Posts: 528 ✭✭✭


    Hi,

    We have a website that counts user visits and store a couple more info such as the title of the page etc..
    It is used for reporting.

    The data is stored in an XML file, and there's XSL to make reports.

    =>Is there a reason why I should use a db instead?

    Could data be lost if i use a flat file?

    thx
    JB


Comments

  • Closed Accounts Posts: 382 ✭✭misterq


    data could be lost using either method.

    If the amount of data being stored is relatively small, eg you are just storing aggregate data, then maybe an xml file would be fine.

    Generally a database is suitable when you have a large amount of data. It is faster and probably more efficient to run reports etc via a database.


    Thats the best I can offer without knowing more about your particular situation.


  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    What happens when two processes try to update the XML file at the same time i.e. when two visitors appear at the same time?
    A database might be better for simultaneous access/recording.

    If you flock the file when updating it, and the other process waits, then the XML file should be okay.


Advertisement