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 methodSecurity CollaborationStable Change and Flexible Management
Metadata collection scopeDMS 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 DMSSupported. Supported.
Full metadata collection at specified points in timeBy 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.
OthersN/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

ObjectMySQL series (1)PostgreSQL series (2)SQL ServerOracleMongoDBRedis
Database
  • Name
  • Character set
NameNameNameN/AName
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/AN/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/AN/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/AN/AN/A
SchemaN/ANameN/AN/AN/AN/A
CollectionN/AN/AN/AN/ANameN/A
KeyN/AN/AN/AN/AN/A
  • Name
  • Type
Note

(1) Native MySQL, PolarDB for MySQL, PolarDB for Xscale, 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 PostgreSQL(Compatible with Oracle), PolarDB for PostgreSQL, AnalyticDB for PostgreSQL, and ApsaraDB OceanBase for Oracle.