> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases

> API reference for the database hierarchy — services, databases, schemas, tables, and stored procedures

# Databases

The database hierarchy is the core of OpenMetadata's data asset model. It mirrors real-world database organization, providing a structured way to catalog and manage all your database metadata.

<div style={{backgroundColor: '#EFF6FF', borderRadius: '8px', border: '1px solid #BFDBFE', padding: '20px'}}>
  <Card title="OpenMetadata Standard" icon="book-open" href="https://openmetadatastandards.org/data-assets/databases/overview/" color="#1570EF">
    All database entity schemas follow the **OpenMetadata Standard for Databases** — an open specification for unified metadata management across platforms.
  </Card>
</div>

## Hierarchy

```
Database Service
└── Database
    └── Database Schema
        ├── Table
        └── Stored Procedure
```

### Database Service

A Database Service represents a connection to a database platform or cluster — for example, a Snowflake account, a PostgreSQL instance, or a BigQuery project. It holds connection configuration and groups all databases within that platform.

### Database

A Database is a logical container within a service. Databases provide logical grouping for data across applications, teams, or purposes.

### Database Schema

A Database Schema organizes tables and stored procedures as a namespace within a database. All platforms use the same 5-level hierarchy in the API. For platforms that don't have a native schema concept (e.g., MySQL), a `default` schema is automatically created to maintain a consistent hierarchy.

### Table

A Table is the fundamental data storage unit with rows and columns. Table metadata includes column definitions, types, constraints, ownership, tags, quality tests, profiler results, sample data, and lineage.

### Stored Procedure

A Stored Procedure is a set of SQL statements stored in the database and executed as a unit. Tracking procedures enables understanding data transformations, lineage, and impact analysis.

***

## Common Patterns

All platforms follow the same **Service → Database → Schema → Table** hierarchy in the API.

| Platform       | Mapping                                                       |
| -------------- | ------------------------------------------------------------- |
| **MySQL**      | Service → Database → `default` schema (auto-created) → Tables |
| **PostgreSQL** | Service → Database → Schema → Tables                          |
| **Snowflake**  | Service → Database → Schema → Tables                          |
| **BigQuery**   | Service → Project (database) → Dataset (schema) → Tables      |

***

## API Resources

| Resource                                                                  | Base Path                       | Description                              |
| ------------------------------------------------------------------------- | ------------------------------- | ---------------------------------------- |
| [Database Services](/v1.12.x/api-reference/data-assets/database-services) | `/v1/services/databaseServices` | Manage database platform connections     |
| [Databases](/v1.12.x/api-reference/data-assets/databases)                 | `/v1/databases`                 | Manage databases within a service        |
| [Database Schemas](/v1.12.x/api-reference/data-assets/database-schemas)   | `/v1/databaseSchemas`           | Manage schemas within a database         |
| [Tables](/v1.12.x/api-reference/data-assets/tables)                       | `/v1/tables`                    | Manage tables within a schema            |
| [Stored Procedures](/v1.12.x/api-reference/data-assets/stored-procedures) | `/v1/storedProcedures`          | Manage stored procedures within a schema |

## Inheritance

When you set an **owner** or **domain** on any entity in the hierarchy, it is inherited by all child entities below it. For example, setting an owner on a Database propagates to all its schemas and tables.
