All Products
Search
Document Center

Change the schema of a logical table

Last Updated: May 09, 2020
  • In the case of database and table sharding, you may want to apply the data definition language (DDL)-based data changes to all tables with the simplest operations as possible. The most satisfying solution is operating these tables by using a single table.
  • To implement the preceding solution, DMS Enterprise aggregates data by using logical databases and logical tables.

Procedure

This topic focuses on the features of logical databases and tables. For more information about basic operations of schema design tickets, see Schema design.

  1. Select a database marked as a logical database for Change Base Database. This operation is different from changing the schema of a single database.

  2. After the ticket is created, click +Create Logical Table to create a logical table directly, or click +Import Table Creation Statements and enter CREATE TABLE statements in the dialog box that appears.

  3. Enter the logical table expression on the Partition Table Topology tab. This operation is different from schema design for a single table.

  4. After configuring the expression, click Calculate Table Topology Distribution to check whether the table topology is as expected. If the topology is not as expected, modify the expression until it meets requirements. Then, save the expression.

  5. Click Preview SQL Statement to check whether the logical table is successfully created.

  6. If the logical table is successfully created, click Perform Changes to Base Database and make schema changes to other databases. The operations are similar to changing the schema of a single database. Execution records are grouped by physical database. You are not allowed to modify the table-based topology expression for the schema change of an existing table. Other operations for modifying fields and indexes in the logical table are similar to that in a physical table.