Hive metastore system database architecture

Hive Metastore system database provides read-only schemas to inspect catalog metadata securely.

Hive Metastore (HMS) persists metadata such as databases, tables, partitions, and storage descriptors in a backend relational database management system (RDBMS) such as MySQL, PostgreSQL, or Oracle. Although you can run SQL queries directly against that backend database, Cloudera recommends that you avoid direct access.

Direct querying is excluded from standard practices due to the following reasons:

  • The HMS backend schema can change across Hive versions and deployments.
  • Direct querying bypasses HMS-level abstractions and access controls.
  • Certain database backends require vendor-specific SQL and tooling.

Instead, you can run read-only queries through Hive by using the beeline client against the metastore system database, which is typically exposed as the sys database. The sys database contains more than 50 tables and mirrors most Hive Metastore (HMS) backend catalog tables, and the metastore schema upgrade scripts create and refresh the sys database.