Updated on 2022-11-14 GMT+08:00

Creating Table Structures in the DDM Instance

Procedure

  1. Switch back to the Instances page, locate the instance you created and click Log In in the Operation column.

    Figure 1 Logging in to the DDM instance

  2. 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 2 Login window

  3. 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 3 Source tables
    Figure 4 Data in table address_test
    Figure 5 Data in table user_test

  4. 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 6 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 7 Creating a sharded table

  5. View the table creation results.

    Figure 8 Viewing table creation results