Updated on 2023-10-09 GMT+08:00

Common Practices

After a schema is created and connected to a DDM instance, you can use common practices provided by DDM as needed.

Table 1 Common practices

Scenario

Practice

Description

SQL Syntax

SQL Standards

This practice describes SQL standards used in DDM.

DDL

This practice describes common DDL operations in DDM, including creating a database, creating a table, and altering a table.

DML

This practice describes common DML operations in DDM, such as INSERT, REPLACE, DELETE, UPDATE and SELECT.

Shard Configuration

How Does DDM Perform Sharding?

This practice describes how sharding works and how to configure shards.

Database and Table Sharding

Sharding Database and Table Data of an RDS for MySQL Instance

This practice describes how to shard database and table data of an existing RDS for MySQL instance using DDM.

Data Migration

Migrating Data from an On-Premises MySQL Instance to DDM

You are using an on-premises RDS for MySQL instance and want to use DDM to store data in a distributed manner.

This practice describes how to migrate data from an on-premise MySQL instance to DDM.

Migrating Data from a Third-Party Cloud MySQL Instance to DDM

You are using a third-party MySQL instance and want to use Huawei Cloud DDM for distributed data storage.

This practice describes how to migrate data from a third-party cloud MySQL instance to DDM.

Migrating Data from a Self-Built MySQL Instance to DDM

You have built a MySQL instance on an ECS and want to migrate your data from the instance to DDM for distributed data storage.

This practice describes how to migrate data from a self-built MySQL instance to DDM.

Migrating Data from Huawei Cloud RDS for MySQL to DDM

This practice describes how to migrate data from Huawei Cloud RDS for MySQL to DDM.

Exporting Data from a DDM Instance

This practice describes how to export DDM instance data to a SQL text file.

Migrating Data from Heterogeneous Databases to DDM

This practice describes how to migrate data from a heterogeneous database such as Oracle, PostgreSQL, and SQL Server to DDM.

Migrating an Entire RDS Database to DDM

This practice describes how to migrate an entire RDS instance to an unsharded schema of a DDM instance.

Migrating an Entire MyCat Database to DDM

This practice describes how to migrate an entire MyCat database to DDM.

Backups and Restorations

Automated Backup

DDM instances cannot be backed up manually. The system backs up them from 02:00 to 03:00 GMT+08:00 every day.

Restoring data to a new instance

Restoring data to a new instance restores your DDM instance and its data nodes (RDS for MySQL instances). Before the restoration, you need to prepare a new DDM instance and as many new RDS for MySQL instances as there are data nodes.

Restoring Metadata

Restoring Metadata mainly restores the metadata of your DDM instance to a new DDM instance. It starts after a point-in-time recovery for the associated data nodes is complete.