The MySQL mode of OceanBase Database provides a data dictionary where tables are protected. A dictionary view is used to access a data dictionary table. In MySQL mode, you can use INFORMATION_SCHEMA tables and SHOW statements to access the data stored in data dictionary tables.
Composition
The MySQL mode of OceanBase Database provides the following types of dictionary views: views prefixed with INFORMATION_SCHEMA., views prefixed with OCEANBASE.CDB/DBA, and views prefixed with MYSQL..
Views prefixed with INFORMATION_SCHEMA.
INFORMATION_SCHEMA allows you to access the database metadata in a MySQL tenant. For example, you can obtain the name of a database or table, the data type of a column, or access privileges. INFORMATION_SCHEMA is also called a data dictionary or a system catalog. INFORMATION_SCHEMA is a database or schema in a MySQL tenant and is used to store information about all other databases maintained by the MySQL tenant. The INFORMATION_SCHEMA database contains several read-only tables. These tables are actually views rather than base tables.
Views prefixed with MYSQL.
Views prefixed with MYSQL. are system views that contain tables storing information required to run OceanBase Database in the MySQL mode. In most cases, views with the mysql. prefix include data dictionary tables that store the metadata of database objects and system tables for other operations. OceanBase Database is compatible with some mysql-prefixed views. For example, the help_* views contain server help information, the time_zone* views store timezone-related information, and the USER and DB views record information related to user privileges.
Views prefixed with OCEANBASE.CDB/DBA
In OceanBase Database, you can use each view with the DBA_ prefix to obtain the corresponding information of some database objects of the current tenant. You can use views with the CDB prefix under the sys tenant of the oceanbase database to obtain information about some database objects of all tenants in the current cluster.
Storage
The metadata of different types of database objects of a tenant is persisted in the corresponding data dictionary table of the tenant. In principle, a tenant can only access its own data dictionary tables by using the corresponding dictionary views. However, the sys tenant can access the data dictionary tables of all tenants in the current cluster by using the corresponding dictionary views.