Not really related to the kind of information I use to post in this blog, but I thought somebody might be interested in a script that I quickly wrote to take the freedb database files and store them in MySQL (you could use another RDBMS provided a driver is available for ActiveRecord). It also shows how an easy it is to interact with a database through Ruby and ActiveRecord.
FreeDB is an open and free alternative to CDDB built using the “solidary community intelligence” I’ve been talking about in my lasts posts.I used it as first test to build a catalog of CDs, but the quality of the data is not very good if you want to build a relational, consistent view of it. It is based on the FreeDB database specification available here. You may also want to try MusicBrainz. Is is a an interesting alternative, although less well known. They started building a relational (and therefore more consistent) database of music metadata, which includes CD albums but also digital tracks.
Anyways, below is the code. There is a lot of room for improvement (it does not check the arguments for instance), but it is a good start point.
Posted by Ramon Guiu