The Amazon DMS (Database Migration Service) is a cloud-based platform for migrating databases from one cloud provider to another or from on-premises systems to the cloud. Organizations have two options for database migration with Amazon DMS. The first is one-time database migration between the source and the target. The other is continuous replication where all changes made at the source are continually updated in the target database through the Change Data Capture feature. But then, both the databases have to be continually kept in sync.
The Working of Amazon DMS
Amazon DMS is a highly optimized solution to move data between data warehouses, relational databases, and NoSQL databases. It is a cloud-based software that works only when it knows from where to move the data and to which location. For this, it is essential to establish a link between the source and the target databases for initiating database migration. Once this linking is carried out, the process that will load data from the source to the target has to be mentioned.
The main advantage of Amazon DMS is that the complete process is fully automated and human intervention is not required at any stage. This is so even when the keys and the tables needed for migration are not present in the target database. However, in such cases, tables, indexes, views, and triggers have to be created with the AWS Schema Conversion Tool (AWS SCT) in the target database. After the data is migrated through the Amazon DMS, users get all the benefits inherent in the cloud environment like cost-efficiency, improved database performance, and high data security.
Types of Amazon DMS Database Migration
There are two types of database migration with Amazon DMS
Homogeneous Migration
This form of database migration is carried out when the database engines, schema structures, data types, and data codes of the source and the target are the same. Migration is an easy activity as the entire source database is migrated to the target database in one go after linking is done between the two.
In this process, the source database should be on an Amazon EC2 instance or an Amazon RDS database. Some examples of Homogeneous Migration with Amazon DMS are Oracle to Amazon RDS for Oracle, MySQL to Amazon RDS for MySQL, MySQL to Amazon Aurora, and Microsoft SQL Server to Amazon RDS for SQL Server.
Heterogeneous Migration
In this case, the database engines, schema structures, and data types and codes of the source and the target databases are different. Hence, migration is a complex affair. First, with the AWS SCT, the data code and the schema structure of the source database have to be formatted to match that of the target database. When this is completed, migration proceeds like the Homogeneous Migration.
The method selected by different organizations depends on the structure of the databases.