All Products
Search
Document Center

Metadata

Last Updated: May 09, 2020

Definition

  • As its name implies, metadata is data about a database itself. Currently, the following types of metadata are collected for a database:
    • The name and character set of the database
    • The name, size, number of rows, character set, fields, indexes, and description of each table
    • The type, precision, and description of each field

Note: All metadata is internally collected from databases such as information_schema. Therefore, certain information such as the table size and the number of rows in a table may be inaccurate and can be used only for your reference.

Scenarios

  • View and export the table schema

    • After entering the keyword of a database name in the search box at the top, use any of the following methods to go to the database search result page:
      • Press Enter. Note: Do not move the pointer down to any record in the auto-completion list.
      • Click Search in the auto-completion list.
      • Click the Magnifier icon next to the search box.
    • After entering the keyword of a database name in the search box at the top, use either of the following methods to go to the database table list page:
      • Click the row of the specified database in the auto-completion list.
      • Move the pointer over the row of the specified database in the auto-completion list and press Enter.
    • On the database search result page, use any of the following methods to go to the database table list page:
      • Click Details in the row of the specified database.
      • Choose More > View Table Details in the row of the specified database.
      • Double-click the row of the specified database.
    1. Use one of the preceding methods to go to the database search result page. Find the target database and choose More > Export Table Creation Statements (CREATE TABLE statements) or Export Schema (in Excel format). Here, data of all tables in the database is exported.
    1. Use one of the preceding methods to go to the database table list page.
      • In the upper-right corner of the tab, click Export. From the menu that appears, select All Table Creation Statements in Database (CREATE TABLE statements) or All Schemas in Database (in Excel format). Here, data of all tables in the database is exported.
      • In the row of the specified table, choose More > Export Table Creation Statements (CREATE TABLE statements) or Export Schema (in Excel format). Here, only data of a single physical table is exported.
        • If you only need to view the schema of a table online without exporting the table schema, click the row of the specified table and view the following information:
          • Fields and their attributes
          • Indexes and their attributes

Metadata synchronization

  • When you register an instance with DMS Enterprise, the system automatically collects the data dictionary of the instance in full data mode. However, if a DDL operation is performed outside the system, the system is currently unable to perceive this operation in real time. In this case, you need to manually synchronize metadata to the system.
    • Method 1 for common users: Go to the database table list page and click Synchronize Metadata in the upper-right corner.
      • If the database is a physical one, only data of the current database is synchronized.
      • If the database is a logical one, data of all physical databases in the logical database is synchronized at a time.
    • Method 2 for the DBA or administrator: Choose System Management > Instance Management. Find the target instance and click Synchronize Now.
    • Method 3 for the administrator: Choose System Management > Configuration Management. Find the following parameter and configure a scheduled task to automatically synchronize the metadata of all instances at the scheduled time on a daily basis:

      Parameter name: Cron expression for full metadata synchronization

Note: For a new database, you can only use method 2 to synchronize metadata. If you want to synchronize metadata after table data in an existing database is changed, you can use either method 1 or method 2.