Google Cloud Associate Data Practitioner — Question 64
You are migrating data from a legacy on-premises MySQL database to Google Cloud. The database contains various tables with different data types and sizes, including large tables with millions of rows and transactional data. You need to migrate this data while maintaining data integrity, and minimizing downtime and cost. What should you do?
Answer options
- A. Set up a Cloud Composer environment to orchestrate a custom data pipeline. Use a Python script to extract data from the MySQL database and load it to MySQL on Compute Engine.
- B. Export the MySQL database to CSV files, transfer the files to Cloud Storage by using Storage Transfer Service, and load the files into a Cloud SQL for MySQL instance.
- C. Use Database Migration Service to replicate the MySQL database to a Cloud SQL for MySQL instance.
- D. Use Cloud Data Fusion to migrate the MySQL database to MySQL on Compute Engine.
Correct answer: C
Explanation
The correct answer is C because Database Migration Service is specifically designed to migrate databases with minimal downtime and maximum data integrity. Option A involves a custom solution that may not ensure the same level of reliability, while option B introduces potential risks with data loss or corruption during the export and import process. Option D also does not provide the same efficiency and reliability as the Database Migration Service for this specific use case.