Our team is facing the following scenario. We're trying to import data from a denormalized data set in MySQL into a normalized MySQL database and are unsure of what a good solution would be for reconciling foreign key values. So far our solution has been to create temporary columns in the destination database tables and use those columns to join on. For instance, we have the following source schema for customer data:


The destination tables are split into customer and address tables, with customer having an address_id foreign key column. Would adding a CUST_ID temporary column to each table be a good way to join the two tables during the load process? We'll be moving approximately 100k records per migration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.