3.3 Data and Metadata Concepts

Metadata provides descriptive information about data and helps Select AI understand and use database objects effectively. This section introduces metadata, metadata clones, and metadata enrichment.

Topics:

3.3.1 Metadata

Metadata is data that describes data. In the case of Select AI, metadata is database metadata, which refers to the data that describes the structure, organization, and properties of the database tables and views.

For database tables and views, metadata includes column names and types, constraints and keys, view definitions, relationships, lineage, quality and freshness indicators, security classifications, and access policies. Well-managed metadata enables discoverability, correct usage, performance tuning, and compliance. Select AI augments NL2SQL prompts with table metadata that include the table definition (table name, columns names and their data types), and optionally table and column comments, annotations, and constraints.

3.3.2 Metadata Clone

A metadata clone or an Autonomous AI Database clone creates a copy of a metadata defining the database or schema, containing only the structure, not the actual data. This clone includes tables, indexes, views, statistics, procedures, and triggers without any data rows. Developers, testers, or those building database templates find this useful. To learn more, see Cloning Moving or Upgrading Autonomous Database.

3.3.3 Metadata Enrichment

The practice of augmenting database schemas with high-quality descriptions, comments, and annotations so an LLM can better understand the intent for tables and columns, clarify business meaning, and generate more accurate SQL. It turns bare table or column names into well-documented assets with clear intent, relationships, and constraints.

Candidate information to include:

  • Table and column descriptions: purpose, business definitions, units, and allowed value ranges
  • Keys and relationships: primary/foreign keys, join paths
  • Data semantics: time granularity, slowly changing dimensions, deduplication rules
  • Constraints and quality: nullability, uniqueness, validation rules, data freshness
  • Synonyms and aliases: common business terms that map to technical names
  • Examples and patterns: sample values, common filters or aggregations

See Overview of AI Enrichment to learn more about adding such metadata using Oracle SQL Developer for VS Code through Visual Studio Code.