This DSN works only if you have a configuration file in your home directory.
Please refer to MySQL manual (http://www.mysql.com/documentation) for more info.

In case you don't have such file, replace the first item with the following:

DSN      => "DBI:mysql:music;host=localhost",
username => "yourusername",
password => "yourpasswd"

# calling the constructor with DSN parameters # my $norm = DBSchema::Normalizer->new ( { DSN => "DBI:mysql:music;host=localhost" # change database and host if different . ";mysql_read_default_file=$ENV{HOME}/.my.cnf", # see comments above src_table => "MP3", index_field => "album_id", lookup_fields => "artist,album,genre", lookup_table => "tmp_albums", dest_table => "songs", verbose => 2, # A LOT of information. Change to "1" to reduce it copy_indexes => 1, # if "1", indexes are recreated into dest_table before data insertion simulate => 1 # Does not perform anything on the database, but only print the SQL statements });

This instruction will perform what we have told the constructor:
1. create a lookup table "tmp_album" with primary key 'album_id'
   and fields 'artist', 'album' and 'genre'
2. create a destination table "songs", containing all fields
   from "MP3", except 'artist', 'album' and 'genre', plus a
   field 'album_id', which is foreign key for the lookup table
3. fill in the table "songs" JOINing information from the
   source table and the lookup table.
This is the alternative approach. Instead of creating a new DBSchema::Normalizer object,
we use the existing one, but changing the parameters.
Notice that the values for 'verbose', 'copy_indexes' and 'simulate' are taken
from the constructor, but you may change them.
'DSN', 'username' and 'password' will be recognized as valid keywords, but 
not used. If you need to change them set up another constructor.