# Schema

Open **Schema** in the sidebar to see your database as a diagram. Each table shows its columns, and the lines between tables are foreign keys.

![Schema diagram in Fakebase Studio](https://fakebase.studio/docs/7_schema_docs_demo.gif)

## Find your way around

- **Move and zoom:** drag the background to move, and scroll or use the controls in the corner to zoom.
- **Rearrange:** drag a table to move it.
- **Pick a schema:** use the schema filter at the top, or choose **All schemas**.
- **Read the keys:** the **Legend** shows which icons mark primary keys and foreign keys.

## Foreign keys

Each line is a foreign key, from the column that holds it to the column it references.

- Click a table to highlight its foreign keys and the tables they connect to.
- Click a line to highlight that one foreign key.
- Use **Edge Type** to draw the lines as **Bezier**, **Smooth step**, **Step**, or **Straight**.

To add or remove a foreign key, edit its column in [Tables](https://fakebase.studio/docs/studio-tables.md#foreign-keys).

---

## Next steps

- [Tables](https://fakebase.studio/docs/studio-tables.md): Create, rename, and delete tables, and manage their columns and foreign keys in Fakebase Studio.
- [Indexes](https://fakebase.studio/docs/studio-indexes.md): Look through every index in your database, how big it is, and how often it's used in Fakebase Studio.
