MP3 Database

MP3 database screenshot
A web-based MP3 database using PHP and MySQL.

Before taking a Database course as part of my program, I was really down on DB's and didn't see the point for them - this practical application changed my mind.

I would probably redo this as a series of XML files now if I had the chance, but I decided originally to use a MySQL database for storing MP3 information along with a PHP backend.

A "collection" table stores many MP3 entries which have CD number, title, album, year, genre, length, bitrate and file size fields - most of which can be used as search specifications.

After a search, results are displayed with the aforementioned attributes in a tabular format. This makes it easy for me to search for a particular song, group or genre, and find what applicable CD contains those files.

Because a custom schema was being used, I needed a specific SQL statement to insert all of the relevant data for each song. A batch file was created that used an open-source ID3 tag parser (written in C,) modified for the purpose. It would iterate through all MP3 files in a given path, and create SQL statements for each containing the required data. Once run on the database itself, the work was effectively done.

Some basic stats are shown on the search page - ie. "7978 MP3s on 51 CDs, 538.40 hours, 29.98 GB" - calculated automagically of course by the DB.