Migrating MySQL to PostgreSQL for Improved Real Estate Website Performance

Migrating MySQL to PostgreSQL: Improved Performance for Real Estate Website

Prev Question Next Question

Question

A team has a website that provides the latest real estate news to subscribers.

It has included a Java frontend, backend, and a MySQL database to store user information.

They plan to migrate the MySQL database to PostgreSQL database to use some features that MySQL does not have.

At the same time, the development lead has raised extra requirements.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - D.

DMS can handle the task of migration from MySQL to PostgreSQL, as shown below.

The first task can be achieved by using a "Selection Rule"

The below diagram depicts using a filter for the "Customers" table on the column "AgencyID" where the values are between "01" and "85"

The second task can be achieved by using the JSON template for "Transformation Rules," as shown below.

{

"rules": [{

"rule-type": "selection",

"rule-id": "1",

"rule-name": "1",

"object-locator": {

"schema-name": "test",

"table-name": "%"

},

"rule-action": "include"

}, {

"rule-type": "transformation",

"rule-id": "2",

"rule-name": "2",

"rule-action": "remove-column",

"rule-target": "column",

"object-locator": {

"schema-name": "test",

"table-name": "latestnews",

"column-name": "test%"

}

}]

}

The third task can also be achieved by using the JSON template for "Transformation Rules" as shown below.

{

"rules": [{

"rule-type": "selection",

"rule-id": "1",

"rule-name": "1",

"object-locator": {

"schema-name": "test",

"table-name": "%"

},

"rule-action": "include"

}, {

"rule-type": "transformation",

"rule-id": "2",

"rule-name": "2",

"rule-action": "add-prefix",

"rule-target": "table",

"object-locator": {

"schema-name": "test",

"table-name": "%"

},

"value": "DMS_"

}]

}

Option A is incorrect.

This option says DMS cannot handle migration.

Indeed migration from MySQL to PostgreSQL is supported by DMS.

Option B is incorrect.

This option says tasks 2 and 3 cannot be done.

In fact, tasks 2 and 3 can be achieved, as shown above.

Option C is incorrect: Because task 3 can be achieved via “Transformation Rules and Actions”

A reference is in.

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html.

Option D is CORRECT: Because DMS can perform this migration with all three tasks being achievable.

Create task

f
i
A task can contain one or more table mappings which define what data Is moved from the source tor
the target. If a table does not exist on the target, it can be created automatically. /

;

Task name* —_sg-selecttransfrm eo

Targetendpoint’ _posigres-target ’ }
Migration type* _— Migrate existing data > 0 $

Starttaskoncreate ~ 5

» Task Settings /

AWS Database Migration Service (DMS) is a service that helps migrate databases to AWS. DMS can migrate databases to or from the cloud, including between different database engines. In this scenario, the team plans to migrate their MySQL database to PostgreSQL. Additionally, the development lead has raised extra requirements. Let's examine each answer option in detail to determine the most accurate answer:

Option A states that DMS cannot handle the task of migration from MySQL to PostgreSQL. Instead, the AWS Schema Conversion Tool should be used to convert the existing database schema, including tables, indexes, and most application code, to the target platform. While the AWS Schema Conversion Tool is a useful tool for database migrations, this answer is not entirely accurate. DMS can handle the task of migration from MySQL to PostgreSQL, as it supports both source and target databases. Therefore, option A is incorrect.

Option B states that DMS can handle the task of migration from MySQL to PostgreSQL. It can achieve task 1 by using the Selection Rule for column “user_activity” in table “user_info”. However, it cannot do tasks 2 and 3. This option is partially correct. DMS can handle the task of migration from MySQL to PostgreSQL, including task 1, which is migrating the user_activity column from the user_info table. However, DMS cannot handle tasks 2 and 3, which are removing columns starting with "test" and renaming a column. Therefore, option B is not the best answer.

Option C states that DMS can handle the task of migration from MySQL to PostgreSQL. It can achieve task 1 by using the Selection Rule for column “user_activity” in table “user_info”. Task 2 can also be completed by using "Transformation Rules and Actions" to remove the columns starting with "test". However, for task 3, DMS cannot do that. This option is also partially correct. DMS can handle task 1 and task 2. However, it cannot handle task 3, which is renaming a column. Therefore, option C is not the best answer.

Option D states that DMS can handle the task of migration from MySQL to PostgreSQL. Furthermore, all tasks can be achieved by specifying Table Selection and Transformations using JSON. This option is the most accurate. DMS can handle the task of migration from MySQL to PostgreSQL, including all three tasks, by specifying Table Selection and Transformations using JSON. JSON allows users to specify how data should be migrated and transformed. Therefore, option D is the best answer.

In conclusion, the most accurate answer is option D: DMS can handle the task of migration from MySQL to PostgreSQL, and all tasks can be achieved by specifying Table Selection and Transformations using JSON.