---
title: Explore database objects
description: Learn how to explore database objects like catalogs, schemas, tables, and views with Catalog Explorer and SQL.
canonical_url: https://docs.databricks.com/aws/en/discover/database-objects
---

# Explore database objects

This page details how you can discover and explore catalogs, schemas, tables, and other database objects in Unity Catalog. The instructions in this page focus on returning details for database objects that you have at least the `BROWSE` or `SELECT` privilege on.

For general information on Unity Catalog privileges, see [Unity Catalog privileges reference](https://docs.databricks.com/aws/en/data-governance/unity-catalog/access-control/privileges-reference.md). For information about how to set schema ownership and permissions, see [Manage object ownership](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md#manage-ownership) and [Manage privileges in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md).

This page includes instructions for Catalog Explorer and SQL. Select the ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog** icon in the workspace side bar to access Catalog Explorer. You can execute SQL commands from a notebook or the query editor attached to compute. To view database objects with Catalog Explorer, you must have at least the `BROWSE` privilege on the objects. To view database objects with SQL, you must have at least the `SELECT` privilege on the object, as well as `USE CATALOG` on the parent catalog and `USE SCHEMA` on the parent schema. You can navigate Unity Catalog-governed database objects in Catalog Explorer without active compute. To explore data in the `hive_metastore` and other catalogs not governed by Unity Catalog, you must attach to compute with appropriate privileges.

## Filtering database objects

During interactive exploration of database objects with Catalog Explorer, you can use the provided text box to filter results. Matched strings in object names are highlighted, but only among currently visible database objects. For complete search of all database objects, see [Search for workspace objects](https://docs.databricks.com/aws/en/search/index.md).

SQL provides similar functionality by optionally specifying a `regex_pattern` clause in conjunction with a `SHOW` statement, such as the following:

```sql
SHOW TABLES IN schema_name LIKE 'sales_*_fy23'
```

## <a id="request" />Request privileges on an object

> [!NOTE]
> **Preview**
>
> This feature is in [Public Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md).

If access request destinations are configured in Unity Catalog, you can request privileges on objects where you have either the `BROWSE` privilege or a direct URL to the object. You can also request privileges directly from permission denied errors in notebooks and the SQL editor.

If you have `ALL PRIVILEGES` on an object, you cannot request access on behalf of others using Catalog Explorer. Instead, use the [Create Access Requests API](https://docs.databricks.com/api/workspace/rfa/batchcreateaccessrequests).

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.

2. Select the object, such as a catalog, schema, table, or view.

3. Click **Request permissions**.

4. Select the principals you are requesting access for. You can request access for yourself, service principals, groups, and other users.

5. Select the privileges and optionally add a message to approvers.

   If a redirect URL is configured, you won’t see this form. Instead, you are redirected to the specified URL to complete your request.

   ![Request access to an object.](https://docs.databricks.com/aws/en/images/unity-catalog/request-permissions.png)

6. Click **Request**. A message is sent to the configured approvers with your access request.

## Explore catalogs

Catalogs represent the top level of data governance in each Unity Catalog metastore.

### SQL

Run the following command to see a list of catalogs available to you.

```sql
SHOW CATALOGS
```

See [SHOW CATALOGS](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-catalogs.md).

### Catalog Explorer

When you access Catalog Explorer, you see a list of catalogs available to you.

### Select a catalog

#### SQL

Run the following command to set your currently active catalog.

```sql
USE CATALOG catalog_name
```

See [USE CATALOG](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-use-catalog.md).

#### Catalog Explorer

Click on a catalog name to select it.

### See catalog details

#### SQL

Run the following command to describe a catalog.

```sql
DESCRIBE CATALOG catalog_name
```

See [DESCRIBE CATALOG](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-catalog.md).

#### Catalog Explorer

Select the **Details** tab to review catalog details.

## Explore schemas

Schemas are collections of tables, views, volumes, functions, and models in Unity Catalog. Schemas are contained in catalogs.

### SQL

Run the following command to see a list of schemas available to you.

```sql
SHOW SCHEMAS IN catalog_name
```

See [SHOW SCHEMAS](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-schemas.md).

### Catalog Explorer

When you select a catalog in Catalog Explorer, you see a list of available schemas.

### Select a schema

#### SQL

Run the following command to set your currently active schema.

```sql
USE schema catalog_name.schema_name
```

See [USE SCHEMA](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-use-schema.md).

#### Catalog Explorer

Click on a schema name to select it.

### See schema details

#### SQL

Run the following command to describe a schema.

```sql
DESCRIBE SCHEMA schema_name
```

See [DESCRIBE SCHEMA](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-schema.md).

#### Catalog Explorer

Select the **Details** tab to review schema details.

## Explore tables and views

Tables and views are contained in schemas. Most tables in Unity Catalog are backed by Delta Lake, but you might also have access to tables registered against external data. See [What data can you query with Databricks?](https://docs.databricks.com/aws/en/query/index.md#lakehouse-external).

Views in Unity Catalog always reference data in another table.

### SQL

Run the following command to see a list of tables available to you.

```sql
SHOW TABLES IN catalog_name.schema_name
```

Run the following command to see a list of tables available to you.

```sql
SHOW VIEWS IN catalog_name.schema_name
```

See [SHOW TABLES](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-tables.md) and [SHOW VIEWS](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-views.md).

### Catalog Explorer

When you select a schema in Catalog Explorer, you see a list of available tables and views.

> [!NOTE]
>
> If the schema has other database objects like volumes present, you might need to click **Tables** to expand the list of tables and views.

## View table contents and details

You can view most table details with either Catalog Explorer or SQL. Some details are only available in the Catalog Explorer UI.

Select a table in Catalog Explorer to explore table details.

### Explore table columns

> [!NOTE]
>
> Users with only the `BROWSE` privilege on an object cannot explore table columns using the `SHOW COLUMNS` SQL command.

#### SQL

Run the following command to view table columns.

```sql
SHOW COLUMNS IN table_name
```

See [SHOW COLUMNS](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-columns.md).

#### Catalog Explorer

Select the **Columns** tab to view table columns.

### View sample data

#### SQL

Run the following command to view 1000 records from a table.

```sql
SELECT * FROM table_name LIMIT 1000;
```

See [Query data](https://docs.databricks.com/aws/en/query/index.md).

#### Catalog Explorer

Select the **Sample Data** tab to view sample data. You must have access to active compute to sample data.

### <a id="natural-language" />Explore table data using an LLM

You can ask natural language questions about your data using Sample Data Explorer in Catalog Explorer.

For any dataset, click the **Sample Data** tab and ask a question about the data. Genie generates SQL using table metadata and row-level sample data as context. After the query is generated, you can validate and run it against the underlying table. You can also enable auto-run to execute generated SQL automatically each time. You must have access to an active compute resource and [Partner-powered AI features](https://docs.databricks.com/aws/en/databricks-ai/partner-powered.md) enabled.

![Explore data using an LLM.](https://docs.databricks.com/aws/en/images/tables/llm-sample-data.png)

For more information, see [Explore sample data with Genie Code](https://docs.databricks.com/aws/en/genie-code/sample-data-explorer.md).

### See table details

> [!NOTE]
>
> Users with only the `BROWSE` privilege on an object cannot view table details using the `DESCRIBE TABLE` SQL command.

#### SQL

Run the following command to describe a table.

```sql
DESCRIBE TABLE table_name
```

Run the following command to display table properties for a table.

```sql
SHOW TBLPROPERTIES table_name
```

See [DESCRIBE TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-table.md) and [SHOW TBLPROPERTIES](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-tblproperties.md).

#### Catalog Explorer

Select the **Details** tab to review table details, including table properties.

### View table history

Table history is available for Delta tables. All Unity Catalog managed tables are Delta tables.

#### SQL

Run the following command to review table history.

```sql
DESCRIBE HISTORY table_name
```

See [DESCRIBE HISTORY](https://docs.databricks.com/aws/en/sql/language-manual/delta-describe-history.md).

#### Catalog Explorer

Select the **History** tab to review table history.

### View frequent queries and users

If the table is registered in Unity Catalog, you can view the most frequent queries made on the table and users who accessed the table in the past 30 days using Catalog Explorer. See [View table insights and popularity](https://docs.databricks.com/aws/en/discover/table-insights.md).

## View primary key and foreign key relationships

For tables with foreign keys defined, click **View relationships** ![View relationships button](https://docs.databricks.com/aws/en/images/icons/pk-fk-view-relationships.svg) at the top-right of the **Columns** tab. The Entity Relationship Diagram (ERD) opens. The ERD displays the primary key and foreign key relationships between tables in a graph, providing a clear and intuitive representation of how data entities connect.

![Entity relationship diagram](https://docs.databricks.com/aws/en/images/unity-catalog/ce-erd.png)

For more information about primary key and foreign key constraints, see [Constraints on Databricks](https://docs.databricks.com/aws/en/tables/constraints.md). For more information about entity relationship diagrams, see [View the Entity Relationship Diagram](https://docs.databricks.com/aws/en/catalog-explorer/entity-relationship-diagram.md).
