XML vs SQL – Which Is Better for Small Projects?

sqlwpfxml

I'm working on a small project which will only have one user at a time since it's a local application (developed in WPF and C#). To store data I was thinking of using an XML file but I'm wondering if this would be the best approach.

What the data is for:

  • Shedules
  • Library of files in folders (with Artist name, Title, Location on HDD)
  • Possibly statistics based on the shedule data

Information regarding the library would be fine in XML I imagine but about all the rest I'm not so sure. Also LINQ to SQL seems to be alot more profitable in terms of development speed than LINQ to XML. Is this correct or am I wrong? I was unsure if I should post this on SO or here but it seemed more appropriate here!

Thank you in advance

Best Answer

If you will be doing lots of IO, SQL is your better choice. SQL is designed to work well to get/store data which is why we use it for storing data on something like a website as opposed to XML.

XML is good for human readable data that can be shared and interpreted between applications, as was its intention. XML parsing involves LOTS of string manipulation which can be come ever costly as the size of the data set increases.

Related Topic