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

# Database Management

> Browse, query, and manage your Supabase database from Nativeline

import { Card, CardGroup, Steps, Tip, Note } from "mintlify/components";

**Pro plan required. Requires Supabase connection.**

The Database tab gives you a visual interface for managing your Supabase PostgreSQL database without leaving Nativeline. Browse tables, inspect schemas, run SQL, and track migrations — all from the same workspace where you build your app.

<Frame caption="The Database tab showing the data browser">
  <img src="https://mintcdn.com/nativeline/vCsYc5lY7QSZ2JFR/images/database-tab.png?fit=max&auto=format&n=vCsYc5lY7QSZ2JFR&q=85&s=7bf40b7d50a3c33615ffe0e9b230a73a" alt="Nativeline Database tab with table browser and data grid" width="3136" height="2136" data-path="images/database-tab.png" />
</Frame>

## What You Can Do

<CardGroup cols={2}>
  <Card title="Data Browser" icon="table" href="/features/database-browser">
    View and manage your data in a spreadsheet-style grid. Search, sort, filter,
    and inspect rows across all your tables.
  </Card>

  <Card title="Schema Viewer" icon="diagram-project" href="/features/database-schema">
    Inspect your database structure — tables, columns, types, relationships,
    indexes, and RLS policies.
  </Card>

  <Card title="SQL Editor" icon="code" href="/features/database-sql-editor">
    Write and execute raw SQL queries directly against your database for precise
    control and debugging.
  </Card>

  <Card title="Migrations" icon="code-branch" href="/features/database-migrations">
    Track and manage versioned schema changes the AI creates when you ask for
    database modifications.
  </Card>
</CardGroup>

## When It Appears

The Database tab shows up in your workspace tabs after you connect Supabase in Project Settings. Until then, you won't see it. Once connected, it stays available for the lifetime of the project.

If you disconnect Supabase later, the Database tab disappears. Reconnecting brings it back with all your data intact — nothing is lost on the Supabase side.

## Getting Started

<Steps>
  <Step title="Connect Supabase">
    Go to **Settings** and connect your Supabase project. You'll need your
    project URL and API keys. See the
    [Supabase Setup guide](/integrations/supabase/setup) for detailed steps.
  </Step>

  <Step title="Open the Database tab">
    After connecting, the **Database** tab appears in your workspace alongside
    your other tabs. Click it to open.
  </Step>

  <Step title="Start browsing your tables">
    Your tables load automatically. Click any table to view its data, or switch
    to the Schema Viewer, SQL Editor, or Migrations view.
  </Step>
</Steps>

## How the Database Tab Fits Into Your Workflow

You don't have to choose between AI-driven development and manual database work. They complement each other:

| Approach             | Best For                                                                          |
| -------------------- | --------------------------------------------------------------------------------- |
| Ask the AI in chat   | Creating tables, adding columns, writing migrations, generating CRUD logic        |
| Use the Database tab | Verifying what the AI created, inspecting data, running ad-hoc queries, debugging |

Most of the time, you'll ask the AI to handle schema changes through chat. Then you'll flip to the Database tab to confirm everything looks right.

## What the AI Can Do Through Chat

You don't always need to open the Database tab. Many database operations can be handled directly through the chat interface:

* **Create tables** — "Create a posts table with title, body, author, and timestamps"
* **Add columns** — "Add a status column to the posts table with a default of draft"
* **Set up relationships** — "Add a comments table that references posts via post\_id"
* **Enable RLS** — "Add row level security to the posts table so users can only edit their own posts"
* **Seed data** — "Add 10 sample posts with realistic content"
* **Write queries** — "Show me how many users signed up each month"

The AI generates the necessary migrations and applies them. You can then verify the results in the Database tab.

<Tip>
  You can also ask the AI to create tables, add columns, and write migrations
  through chat. The Database tab lets you verify and inspect what was created.
</Tip>

## Database Tab vs. Supabase Dashboard

You might wonder why you'd use the Database tab when Supabase has its own dashboard. Here's the difference:

| Feature                 | Nativeline Database Tab                | Supabase Dashboard      |
| ----------------------- | -------------------------------------- | ----------------------- |
| **Context**             | Right next to your code and chat       | Separate browser tab    |
| **AI integration**      | AI can reference what you see          | No AI connection        |
| **Workflow**            | Part of your build loop                | Separate workflow       |
| **Full admin features** | Core browsing, schema, SQL, migrations | Complete database admin |

The Nativeline Database tab is designed for the build loop — quick checks, verification, and debugging while you're actively developing. For advanced database administration (backups, extensions, connection pooling), you'll still use the Supabase dashboard directly.

<Note>
  The Database tab connects to your Supabase database using the credentials you
  provided during setup. It reads and writes the same data your app uses — there's
  no separate copy.
</Note>

## Supported Database Features

The Database tab works with standard PostgreSQL features that Supabase supports:

* **Tables and views** — Browse any table or view in your public schema
* **All PostgreSQL data types** — text, integer, boolean, uuid, timestamp, jsonb, arrays, and more
* **Foreign keys and relationships** — See how tables connect to each other
* **Row Level Security** — View and understand RLS policies
* **Indexes** — See which columns are indexed for performance
* **Functions and triggers** — View through the SQL Editor

## Frequently Asked Questions

**Can I use the Database tab with a free plan?**

No. The Database tab requires the Pro plan. You also need to connect a Supabase project first.

**Does the Database tab work with any PostgreSQL database?**

The Database tab is designed specifically for Supabase. It uses the Supabase API to connect and manage your data. Other PostgreSQL providers are not supported.

**Will changes I make in the Database tab affect my live app?**

Yes. The Database tab connects to the same Supabase database your app uses. Any data you modify through the SQL Editor or migrations will immediately affect your app.

**Can I use the Database tab and the AI chat at the same time?**

Absolutely. You can have the Database tab open while chatting with the AI. This is the recommended workflow — ask the AI to make changes, then verify them in the Database tab.

**What if I don't see the Database tab?**

Make sure you've connected Supabase in your project settings and that you're on the Pro plan. The tab only appears after a successful Supabase connection. If you've just connected, try closing and reopening your project.

**Can the AI read my database schema when generating code?**

Yes. When Supabase is connected, the AI is aware of your database structure. It uses this context to generate accurate code that matches your tables, columns, and relationships.

## Related

<CardGroup cols={2}>
  <Card title="Supabase Setup" icon="plug" href="/integrations/supabase/setup">
    Connect your Supabase project to Nativeline.
  </Card>

  <Card title="Chat Interface" icon="message" href="/features/chat-interface">
    Learn how to use the AI chat to build features and manage your database.
  </Card>
</CardGroup>
