- Data Migration
- Class::DBI::DataMigration
- Class::DBI::DataMigration
- 3 Steps, 3 Technologies:
- Examples: TransGaming Games Database
- Example 1: Mapping Scalar Column Values
- Step 1: Specify the source and target databases using Class::DBI
- Step 1: Specify the source and target databases using Class::DBI
- Step 2: Specify a data structure that maps between source and target databases using YAML
- Data::Dumper notation
- Data::Dumper notation
- The same thing in YAML
- YAML
- So Far
- Step 3: Pass the data structure to Class::DBI::DataMigration::Migrator
- How It Works: 3 Main Classes (for now)
- How It Works: 2 Big Steps
- How It Works: Loops Within Loops
- Example 2: Mapping Between To-one Relationships
- Example 2: Mapping Between To-one Relationships
- Step 1: Specify the source and target databases using Class::DBI
- Step 1: Specify the source and target databases using Class::DBI
- A Quick Digression: Class::DBI::DataMigration::Mapping::HasAToHasA
- Step 2: Specify a data structure that maps between source and target databases using YAML
- Step 2: Specify a data structure that maps between source and target databases using YAML
- Step 3: Pass the data structure to Class::DBI::DataMigration::Migrator
- How It Works: How a Migrator Migrates
- How It Works: How a Mapper Maps
- How It Works: How a Mapping Maps
- Example 3: Mapping an Attribute to a To-one Relationship
- Example 3: Mapping an Attribute to a To-one Relationship
- Example 3: Class::DBI Code
- The Problem
- The Solution - code
- The Solution - YAML
- The Solution - YAML
- The script code's still the same!
- Example 4: Mapping an Attribute to a New Row with a To-one Relationship
- Example 4: Mapping an Attribute to a New Row with a To-one Relationship
- Example 4: Mapping an Attribute to a New Row with a To-one Relationship
- The Problem
- Investigation
- Investigation
- The Solution: A Custom Mapper Class
- The Solution: YAML
- The Solution: YAML
- The script code's STILL the same!
- Synchronization