I'm writing an application that keep track of a library of music, and I need a way to store the list of tracks, albums and other data. Usually for something like this I would use an XML file to save the data. And then I would use an ADO.NET DataTable to manipulate the data. But this program could potentially be saving a large number of data items. Also I'm going to want to be able to quickly search, sort, and filter the table of songs.
So my first question is there a best practices limit on how much data should be stored in a single XML file before it's a better idea to be using a relational database? Second what are some alternative options for how I store this data in a single file. Keep in mind I don't want the program to rely on there being a server (MS SQL, MySQL etc.) running somewhere that it can connect to. I want the data stored in a single file. Also I'm not a huge fan of MS Access. So while there are ways for ADO.NET to access an MDB file I'm looking for other options.
Another option I'm considering is sticking with serializing/serializing my collection of "Track" objects to/from XMl. Yet doing any database type stuff like searching, sorting, filtering using Linq on the collection. I haven't used Linq yet, so I'm not sure of the specifics for how this would be done, or if it would be the best option.
YAML, HTML5, JSON, JavaScript, and Python are the most popular alternatives and competitors to XML.
With XML, the data can be stored in separate XML files. With a few lines of JavaScript code, you can read an XML file and update the data content of any HTML page.
XML is a very useful technology for moving data between different databases or between databases and other programs.
XML Database is used to store huge amount of information in the XML format. As the use of XML is increasing in every field, it is required to have a secured place to store the XML documents. The data stored in the database can be queried using XQuery, serialized, and exported into a desired format.
While I can't answer your questions regarding XML, I believe the solution to your problems is SQLite. It's an extremely fast and lightweight file-based SQL db that doesn't require a server. You can also use something like System.Data.SQLite to interact with it from within .NET.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With