Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Database normalization the easier way

by gmax (Abbot)
on Dec 17, 2001 at 17:15 UTC ( #132513=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    );
    my $norm = Normalizer->new (\%parameters);
    $norm->do();
    
  2. or download this
    perl -e 'use Normalizer; Normalizer->snew(qw(localhost music \ 
        MP3 album_id album,artist,genre tmp_albums songs 1 0 0))->do()'
    
  3. or download this
     +----------+-------------+------+-----+----------+----------------+
     | Field    | Type        | Null | Key | Default  | Extra          |
    ...
     | size     | int(11)     |      |     | 0        |                |
     | genre    | varchar(10) |      | MUL |          |                |
     +----------+-------------+------+-----+----------+----------------+
    
  4. or download this
        DROP TABLE IF EXISTS tmp_albums;
          # create the lookup table
    ...
        FROM MP3 src INNER JOIN tmp_albums lkp 
            ON (src.artist =lkp.artist and src.album =lkp.album 
                and src.genre =lkp.genre);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://132513]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2015-07-08 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls