User tenant introduction

2024-11-11 07:37:14  Updated

OceanBase's user tenant can be considered as a database instance in a legacy database management system. It is created by the system tenant according to specific business requirements.

The characteristics of a user tenant are the same as those of a typical database instance. Some of the primary characteristics include:

  • A user tenant can have its own users.
  • In a user tenant, it is possible to create various objects, such as databases (only supported in MySQL mode) and tables.
  • A user tenant has its own system tables and system views.
  • A user tenant has its own system variables.

The metadata of all user data is stored within the user tenant, so each tenant has its own namespace and is inaccessible from each other. The system tenant manages all user tenants, and the hierarchical relationship between the system tenant and user tenants is illustrated in the diagram below.

Tenant

Users created in a user tenant can only log in to that specific tenant and remain invisible to other tenants.

  • For a MySQL tenant, user information can be queried from the mysql.user view.
  • For an Oracle tenant, user information can be queried from the ALL_USERS view.

Tables created in a user tenant are invisible to other tenants.

  • For a MySQL tenant, information about all user tables in the tenant can be queried from the information_schema.tables view.
  • For an Oracle tenant, information about all user tables in the tenant can be queried from the ALL_TABLES view.

A user tenant is only able to modify system variables within its own tenant.

  • For a MySQL tenant, information about system variables can be queried from the views information_schema.global_variables and information_schema.session_variables. It can also be queried using the SHOW VARIABLES statement.
  • For an Oracle tenant, the SHOW VARIABLES statement can be used to query all system variables within the tenant.

Contact Us