Google Cloud Professional Cloud Database Engineer — Question 150
Your company is migrating a legacy on-premises Oracle database to Cloud SQL for PostgreSQL. As a part of the migration, you need to convert schema and other database code objects, such as procedures, functions, and triggers, from Oracle to PostgreSQL. The database migration needs to be accomplished with minimal application code changes and manual intervention. What is the Google-recommended approach you should do?
Answer options
- A. Manually rewrite both the Oracle schema and queries to be compatible with PostgreSQL syntax and semantics.
- B. Use a schema conversion tool to automatically convert the Oracle schema to PostgreSQL schema, then manually rewrite all queries.
- C. Migrate the data directly from Oracle to PostgreSQL without any conversion. Rely on application-level compatibility layers to handle any syntax or semantic differences.
- D. Use Database Migration Service code conversion workspace, then review and refactor as needed.
Correct answer: D
Explanation
The correct answer is D because using the Database Migration Service code conversion workspace allows for automation of the conversion process while still providing the opportunity to review and make adjustments. Option A is incorrect as it requires extensive manual work, while B suggests manual query rewriting after using a tool, which is less efficient. Option C is not viable since it ignores the necessary conversions for compatibility.