After you configure a logical database, Data Management (DMS) automatically parses physical tables in the logical database and generates a logical table for those that comply with the logical table creation rule. You can also update the generated logical table. This topic describes the logical table generation rule and how to update the generated logical table.
Prerequisites
- A logical database is configured. For more information, see Logical database.
- Multiple physical tables that have the same table schema and table name prefix are in the logical database.
Logical table creation rule
- A logical table is generated for multiple physical tables that have the same table
schema and table name prefix.
Note If the table schema of a physical table is unique in the logical database, no logical table can be generated for the physical table.
- The default name of a logical table is the name prefix of the physical tables that
compose the logical table.
For example, if a logical database has the test_0, test_1, test_2, and test_3 physical tables, the name of their logical table is test. The expression of the logical table name is test_[0-3].
Update the logical table
What to do next
After a logical table is generated, you can perform the following operations on the logical table:
- Data query: You can query a logical table on the SQL Console tab in the same way as you query a single table. For more information, see Query a logical table.
- Data export: You can submit a data export ticket to export all the data from the logical table. For more information, see Export databases.
- Data change: You can submit only one data change ticket. DMS automatically executes relevant SQL statements on each physical table to change the table data. For more information, see Change regular data.
- Schema design: You can submit only one schema change ticket. DMS automatically executes relevant SQL statements on each physical table to change the schema. For more information, see Design schemas and Change the schema of a logical table.
FAQ
Q: What can I do if I cannot find the generated logical table in the DMS console after a logical database is configured?
A: Check whether the schemas and table name prefix of the source physical tables are the same. After you make sure that the schemas and table name prefix of the physical tables are the same, update the logical table and try again.