I wish to have the ability to store details about an audio lesson that's been opened up using my application. I'd like for that user to have the ability to provide the song a rating which rating be loaded each time the customers opens that file using my application.

I should also know whether I ought to keep rankings inside a database or perhaps an xml file.

I'd make use of a single-file, zero-config database. SQL Server Compact inside your situation.

I do not think XML may be beneficial. XML stands out in data interchange and storing very small quantities of information. Within this situation a person may rate 1000's of tracks ( I've personally in online radios that permit rankings), and you'll have all information to keep concerning the track.

Export and import using XML export methods if you need to. Avoid using it as being your primary datastore.

C# ID3 Library is really a .Internet class library for editing id3 tags (v1-2.4). I'd keep rankings into the comments portion of the mp3 since id3v1 doesn't have most of the storage features that id3v2 does. If you wish to store more information for every mp3, how about putting a unique identifier around the mp3 after which getting that perform a database research?

I'd be careful about adding custom tags to tunes because it is a good way to ruin a sizable library. Also, I've gone lower this road before even though I loved the programming understanding that arrived on the scene from it, trying something similar to the iTunes SDK or Last FM may well be a better route.

I'd store it inside a file because it is simpler to help keep using the mp3 file itself. If all you are doing is storing rankings, can you consider setting the ID3 rating area rather?

For this kind of quite simple storage I do not think it matters that much. The pro's of XML is its super easy to deploy and it is editable outdoors of the application. the con's are, its editible outdoors the application (might be good, might be bad, is dependent in your situation)

Maybe an alternative choice (just since you can -) is definitely an OODBMS, take a look at DB4Objects, its seriously addictive and incredibly, very awesome.

As pointed out earlier it is best to keep similarly info on television file itself. And my suggestion is by using TagLib# lib with this (best media metadata lib I'm able to find). Very effective and simple to use.

I'd keep rankings inside a XML file, this way it's not hard to edit in the outdoors, readable insInternet and it's not necessary to be worried about shipping a database for something simple along with you application.

Something similar to this may meet your needs:

  <Song Title="{SongTitle}">
    <Path>{Song path}</Path>

When the song format supports appropriate meta data (eg. MP3), then follow Kevin's advice of utilizing the meta data. This really is undoubtedly the easiest way to do it, which is exactly what the meta information is meant for.

Otherwise, it really is dependent in your application. If you wish to share the rating information - especially on the web service, i quickly would choose XML: it might be trivial to provide your XML entries as you large feed, for instance.

XML (or other text formats) also provide the benefit that they'll easily be edited with a human inside a text editor.

The database might have its advantages should you have had a far more closed system, you desired speed and fast indexing, and/or produce other tables you might like to store too (eg. data about albums and bands).