After you configure a logical database, DMS automatically parses all the physical tables in the logical database to generate a logical table based on the schemas of the physical tables. You can also update the generated logical table.
A logical database is configured.
Update a logical table
DMS aggregates physical tables based on the following rules:
- Physical tables that can be aggregated to a logical table must have the same schemas including field types and the same prefixes of table names.
- Otherwise, the physical tables cannot be aggregated.
By default, the name of a logical table follows the names of the source physical tables, excluding digits and underscores (_). For example, if the names of 100 source tables are test_00, test_01, ..., and test_99, the name of the logical table is test. The expression of the logical table name is test_[00-99].
After a logical table is generated, you can also update the logical table.
- Log on to the DMS console.
- In the top navigation bar of the DMS console, enter the name of a logical database
in the search box and click the icon. Note To add filter conditions, you can select Logical Database from the Object drop-down list.
- Find the logical database, move the pointer over Re-extract Table. in the Actions column, and then select DMS immediately parses the metadata of all the physical tables in the logical database to generate a logical table. You can refresh the page to query the updated logical table in a few minutes.
What to do next
- Data query: You can query a logical table on the SQLConsole tab in the same way as you query a single table.
- Data export: You can submit a data export ticket to export all the data from a logical table. For more information, see Export databases.
- Data change: You need to 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 need to 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.
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 of the source physical tables are the same. If the schemas of the physical tables are the same, update the logical table and try again.