Metadata is used to retrieve and display data in Data Management (DMS). Metadata is the basis for automatic identification based on sensitive data rules. Metadata can also be used to implement fine-grained access control on databases, tables, columns, rows, and programmable objects. DMS supports different metadata collection scopes and methods based on the control mode of each database instance.

Background information

Metadata is a type of data dictionary that describes a database. Metadata includes the database name, the database character set, table names, table sizes, the number of rows in each table, the character set of each table, table columns, table indexes, the description of each table, the data type of each column, the precision of the columns, and the description of the columns. DMS collects metadata from databases such as information_schema. The collected metadata may not be accurate and is used only for reference.

Collection scopes and methods

Collection scope and method Security Collaboration Stable Change and Flexible Management
Metadata collection scope DMS collects and stores all metadata of a database instance. For more information, see the Collected metadata section of this topic. DMS collects and stores all metadata of a database. Other metadata is loaded in real time after logon.
Full metadata collection at the point in time when a database is added to DMS Supported. Supported.
Full metadata collection at specified points in time By default, DMS collects metadata from all instances that are managed in Security Collaboration mode of a tenant at six points in time each day.
Note DMS synchronizes the metadata every four hours at 02:00, 06:00, 10:00, 14:00, 18:00, and 22:00.
Not supported.
On-demand incremental metadata collection
  • On the SQLConsole tab, click the Refresh icon to trigger incremental metadata collection.
  • In the left-side navigation pane in the DMS console, right-click a database and select Refresh / Syn dictionary to trigger incremental metadata collection.
  • If you are a database administrator (DBA) or administrator, choose Data Assets > Instances in the top navigation bar. On the Instance List tab, find the instance that you want to manage, move the pointer over More in the Actions column, and then select Refresh/Sync dictionary to trigger incremental metadata collection. For more information, see Synchronize the data dictionary for an instance.
  • Execute DDL statements on a table in DMS to trigger incremental metadata collection.
  • On the SQLConsole tab, click the Refresh icon to trigger incremental metadata collection.
  • In the left-side navigation pane in the DMS console, right-click a database and select Refresh / Syn dictionary to trigger incremental metadata collection.
  • If you are a DBA or administrator, choose Data Assets > Instances in the top navigation bar. On the Instance List tab, find the instance that you want to manage, move the pointer over More in the Actions column, and then select Refresh/Sync dictionary to trigger incremental metadata collection. For more information, see Synchronize the data dictionary for an instance.
Others N/A When you log on to a database, DMS collects information about the database based on the permissions of the account that you use.

Use metadata

Metadata can be used to retrieve data and manage permissions. You can export metadata by calling API operations. The exported metadata can be used in operations such as compliance audit. For more information about the API operations that are related to metadata, see Metadata management of databases and tables.
Note You can export only the metadata of instances that are managed in Security Collaboration mode by calling API operations.

Collected metadata

Object MySQL series (1) PostgreSQL series (2) SQL Server Oracle MongoDB Redis
Database
  • Name
  • Character set
Name Name Name N/A Name
Table
  • Name
  • Description
  • Character set
  • Number of rows
  • Size
  • Name
  • Description
  • Number of rows
  • Size
  • Name
  • Description
  • Number of rows
  • Size
  • Name
  • Description
  • Number of rows
  • Size
N/A N/A
Column
  • Name
  • Data type
  • Whether the value of the column can be left empty
  • Length
  • Precision
  • Description
  • Name
  • Data type
  • Whether the value of the column can be left empty
  • Length
  • Precision
  • Description
  • Name
  • Data type
  • Whether the value of the column can be left empty
  • Length
  • Precision
  • Description
  • Name
  • Data type
  • Whether the value of the column can be left empty
  • Length
  • Precision
  • Description
N/A N/A
Index
  • Name
  • Type
  • Indexed column
  • Name
  • Type
  • Indexed column
  • Name
  • Type
  • Indexed column
  • Name
  • Type
  • Indexed column
  • Name
  • Indexed column
N/A
Programmable object
  • Name
  • Type
  • Name
  • Type
  • Name
  • Type
N/A N/A N/A
Schema N/A Name N/A N/A N/A N/A
Collection N/A N/A N/A N/A Name N/A
Key N/A N/A N/A N/A N/A
  • Name
  • Type
Note

(1) Native MySQL, PolarDB for MySQL, PolarDB-X, AnalyticDB for MySQL, Data Lake Analytics (DLA), ApsaraDB for ClickHouse, ApsaraDB OceanBase for MySQL, native MariaDB, and ApsaraDB RDS for MariaDB

(2) Native PostgreSQL, PolarDB for Oracle, PolarDB for PostgreSQL, AnalyticDB for PostgreSQL, and ApsaraDB OceanBase for Oracle.