# Database Schema

> The plan of a database. It lists the tables, columns, types and links.

**Field:** Software Development  
**Category:** Databases  
**Also known as:** Schema

## Think of it like

Think of it like the floor plan of a house. It shows every room and door before anyone moves in.

## Definition

A database schema is the plan for how a database is laid out. It lists the tables, their columns, the types and the links between them. It says what shape the data must have, before any data goes in. The database refuses anything that does not fit the plan. To change the plan later, you use a migration. A good schema makes the app simpler, and a bad one makes each feature harder.

## Example

Emma draws her schema before she writes code. It has customers, orders and products, with an arrow for each link.

## Why it matters

The schema shapes everything built on top. Fixing a bad one later means moving real data.

## Common mistake

Changing the schema by hand on the live server. Use a migration, so every copy of the database changes the same way.

## Three principles

- **The plan.** Tables, columns, types, links.
- **Enforced.** Data that does not fit is refused.
- **Change with care.** Use migrations, not hand edits.

## Related terms

- [Database Table](https://learn.benibix.com/term/development/database-table)
- [Column](https://learn.benibix.com/term/development/column)
- [Foreign Key](https://learn.benibix.com/term/development/foreign-key)
- [Database Migration](https://learn.benibix.com/term/development/database-migration)
- [Schema Evolution](https://learn.benibix.com/term/data/schema-evolution)
- [Entity-Relationship Diagram (ERD)](https://learn.benibix.com/term/data/entity-relationship-diagram)

## Told apart from

- [ERD vs Database Schema](https://learn.benibix.com/compare/entity-relationship-diagram-vs-schema): People think an ERD and a database schema are the same thing, and they are not. The schema is the real set of tables and columns inside the database. An ERD is a drawing of it. You can change the drawing all day, and the database stays the same until you change the schema.

---

Source: https://learn.benibix.com/term/development/schema
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
