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

# Schema and ER diagram

> Explore table structure and relationships, including an auto-generated entity-relationship diagram.

## Structure view

Switch a table to its **Structure** tab to see how it is built:

* **Columns** - name, type, nullability, default, and keys.
* **Indexes** - including uniqueness.
* **Foreign keys** - relationships to other tables.
* **Triggers** - where the engine supports them.

<img src="https://mintcdn.com/flextable/N9AmtdFPRmv5ROOo/images/07-schema-diagram/structure.png?fit=max&auto=format&n=N9AmtdFPRmv5ROOo&q=85&s=8d9168984f2b43ce93616a2cf8075634" alt="Structure view" width="1050" height="827" data-path="images/07-schema-diagram/structure.png" />

## ER diagram

Open the **Diagram** tab to see your tables and their relationships as an entity-relationship diagram, a quick way to understand an unfamiliar schema.

<img src="https://mintcdn.com/flextable/N9AmtdFPRmv5ROOo/images/07-schema-diagram/diagram.png?fit=max&auto=format&n=N9AmtdFPRmv5ROOo&q=85&s=67a9488ae0319c93f3215dcfa0a44eb6" alt="Auto-generated ER diagram" width="1496" height="861" data-path="images/07-schema-diagram/diagram.png" />

<Tip>**Foreign keys become lines.** Relationships detected in the schema are drawn automatically.</Tip>

<Note>Viewing the structure and the diagram is free. **Exporting** the diagram (PNG, SVG, or DBML) is a PRO feature.</Note>
