Lesson 3 of 5 Schema Evolution and Data Lineage

Converting Schemas Between Database Engines

This lesson explains how AWS tools automate most of the conversion of schemas and code when moving between database engines, such as Oracle to PostgreSQL or Teradata to Redshift, and report what remains.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish DMS Schema Conversion from the AWS Schema Conversion Tool.
  • Describe the steps of a heterogeneous conversion.
  • Optimise converted schemas for the target engine.

Conversion tools

Moving to a different database engine requires converting the schema and code, such as stored procedures, and AWS provides two tools. DMS Schema Conversion is managed and runs in the DMS console, with nothing to install. It converts common transactional databases to Aurora, RDS and Redshift, and generative AI helps convert complex code. The AWS Schema Conversion Tool (SCT) is a desktop application supporting a broader range of sources, including data warehouses such as Teradata and Netezza, and its data extraction agents move data from those warehouses. The following table summarises the tools.

ToolHow it runsNotes
DMS Schema ConversionManaged, in the DMS consoleConverts common OLTP sources to Aurora, RDS and Redshift; generative AI assists with complex code
AWS Schema Conversion Tool (SCT)Desktop applicationBroader set of sources, including data warehouses such as Teradata and Netezza; data extraction agents
Scenario questions

DMS Schema Conversion or SCT?

Exam skills 2.4.3

Choose the schema conversion tool for each migration.

Log in to try this activity Interactive activities are free with an account.

The conversion process

A heterogeneous migration moves a database to a different engine, for example from Oracle to Amazon Aurora PostgreSQL or to Amazon Redshift, so the schema and code must be converted as well as the data. The AWS Schema Conversion Tool, and the schema conversion feature of AWS DMS, follow a standard sequence.

  1. Run the assessment

    Run the conversion and read the assessment report, which shows what converts automatically and what needs manual work, and therefore how much effort the migration will take.

  2. Fix the remaining items

    Convert by hand what could not be converted, such as unsupported functions and procedural code with no direct equivalent in the target.

  3. Apply the schema

    Apply the converted schema to the target database.

  4. Migrate and validate

    Migrate the data with AWS DMS, then validate it, for example by comparing row counts and checksums with the source.

The following diagram shows the results of a DMS Schema Conversion assessment for an Oracle data mart and the steps that follow.

The DMS Schema Conversion assessment for the Oracle data mart. All tables and indexes convert automatically, 96% of views and 82% of stored procedures; the rest need manual work. The team converts those with generative AI assistance and review, applies the schema, and migrates the data with DMS full load and CDC.
The scenario is illustrative.

Optimising converted schemas

A converted schema reproduces the design of the source, which was built for a different engine and often for a different workload. A schema converted from a transactional database into Amazon Redshift, for example, has no distribution or sort keys chosen for analytical queries.

After conversion, the schema is therefore optimised for the target. In Redshift, distribution and sort keys are defined for the expected queries, and compression encodings are chosen; in a data lake, columnar formats are used. Large tables are partitioned by the columns most queries filter on, and operational databases are indexed for their actual query patterns rather than those of the old system.

Select all that apply

After converting to Redshift

Exam skills 2.4.3 · 2.4.5

Identify what to do after converting an OLTP schema to Redshift.

Log in to try this activity Interactive activities are free with an account.
Worked example

Reading the assessment report

A company plans to move an Oracle data mart to Aurora PostgreSQL. The DMS Schema Conversion assessment report summarises the effort, as shown in the following table.

Object typeConverted automaticallyNeeds manual work
Tables and indexes100%None
Views96%4 views using Oracle-specific hints
Stored procedures82%11 procedures using packages and autonomous transactions

The team estimates the manual work from the report, converts the remaining procedures with generative AI assistance and review, applies the schema, and then migrates the data with DMS full load and CDC, validating row counts before cutover.

Check yourself

What follows schema conversion in a warehouse migration?

Show answer

Data migration with AWS DMS, then validation against the source.

Exam Tips

Remember for the exam

  • To move a Teradata or Oracle warehouse to Redshift, use SCT or DMS Schema Conversion, then migrate the data.
  • To see what converts automatically, read the assessment report.
  • Schema conversion is followed by data migration with DMS.
  • SCT supports more warehouse sources than DMS Schema Conversion.
  • Optimise converted schemas for the target engine.