DBSchema::Normalizer

DBSchema::Normalizer is a database normalization.
Download

DBSchema::Normalizer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Giuseppe Maxia
  • Publisher web site:
  • http://search.cpan.org/~gmax/Chess-PGN-Parse-0.19/Parse.pm

DBSchema::Normalizer Tags


DBSchema::Normalizer Description

DBSchema::Normalizer is a database normalization. DBSchema::Normalizer is a database normalization. It can convert a table from 1st to 2nd normal form.SYNOPSIS # the easy way is to give all parameters to the constructor # and then call do() # use DBSchema::Normalizer; my $norm = DBSchema::Normalizer->new ( { DSN => $DSN, username => $username, password => $password, src_table => $sourcetable, index_field => $indexfield, lookup_fields => $lookupfields, # comma separated list lookup_table => $lookuptable, dest_table => $dest_table, copy_indexes => "yes", }); $norm->do(); # Just Do It! # Alternatively, you can have some more control, by # creating the lookup table and normalized table separately, # especially useful if one of them is an intermediate step. # use DBSchema::Normalizer qw(create_lookup_table create_normalized_table); my $norm = DBSchema::Normalizer->new( { DSN => $DSN, username => $username, password => $password }); $norm->create_lookup_table ( { src_table => $tablename, index_field => $indexfield, lookup_fields => $lookupfields, lookup_table => $lookuptable }); $norm->create_normalized_table ( { src_table => $tablename, index_field => $indexfield, lookup_fields => $lookupfields, lookup_table => $lookuptable, dest_table => $dest_table, copy_indexes => "yes", });DBSchema::Normalizer is a module to help transforming MySQL database tables from 1st to 2nd normal form. Simply put, it will create a lookup table out of a set of repeating fields from a source table, and replace such fields by a foreign key that points to the corresponding fields in the newly created table.All information is taken from the database itself. There is no need to specify existing details. The module is capable of re-creating existing indexes, and should deal with complex cases where the replaced fields are part of a primary key. Requirements: · Perl


DBSchema::Normalizer Related Software