Updated on 2025-03-17 GMT+08:00

Creating Table Structures in the DDM Instance

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select region CN-Hong Kong.
  3. Click the service list icon on the left and choose Databases > Distributed Database Middleware.
  4. On the Instances page, locate the required instance and click Log In in the Operation column.
  5. In the displayed dialog box, enter the username and password of the DDM account created in Creating a DDM Account and click Log In.

    Figure 1 Login window

  6. Create the same tables as those in the existing RDS instance. You can select to create broadcast, unsharded, or sharded tables based on source table properties. For details about how to use a broadcast and unsharded table, see Using Broadcast and Unsharded Tables.

    Figure 2 Source tables
    Figure 3 Data in table address_test
    Figure 4 Data in table user_test

  7. Run the following command to create a broadcast table as source table user_test and a sharded table as source table address_test: For SQL statements for creating tables, see Creating a Table.

    create table user_test (id char(3), age int(3), name varchar(255),primary key(id)) broadcast;
    Figure 5 Creating a broadcast table
    create table address_test (id char(3), name varchar(255), address varchar(255),primary key(id)) dbpartition by hash(id);
    Figure 6 Creating a sharded table

  8. View the table creation results.

    Figure 7 Viewing table creation results