Friday 18 January 2008

Database testdata

Whenever I try out a new framework, library or tool that uses a database, I need some data to run it on. Nothing too big, but not too small either. I've been thinking about how to create some useful testdata for ages. Yesterday I had the idea of using artist/album/song data from freedb. I downloaded a few updates to avoid a huge download of the whole database, selected a few artists and wrote a Python parser to create SQL insert statements. The resulting database is here for anyone who might find it useful. It contains 18 artists, 49 albums and 529 songs.

album-data-h2.jar.gz -- about 20k, a gzipped tar file containing an H2 database.

The individual SQL files are available if you want to use the data to populate something other than H2. You may need to modify the files to suite your database's SQL dialect.

album-sql.tar.gz -- about 11k, a gzipped tar file containing the schema creation and database population SQL. You will need to load the tables in the proper order to prevent foreign key violations: genres, artists, albums and finally tracks.

Use these at your own risk -- no guarantee implied or offered.

The freedb data is licensed under the GPL.

1 comment:

Mike Wilson said...

The files have moved to a new Drupal site, please go to http://projects.babblemind.com/music for the downloads.