ERD vs Database 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.
Entity-Relationship Diagram (ERD)
A drawing of boxes and lines. It shows the things you track and how they link.
An entity-relationship diagram is a drawing of a data model. Each box is an entity, a thing you track, like a customer or an order. Inside the box are the fields you keep about it. Lines between boxes show how the things link. Marks at the ends of a line show how many, such as one customer to many orders.
Database Schema
The plan of a database. It lists the tables, columns, types and links.
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.
In one line
- Entity-Relationship Diagram (ERD)
- A drawing of boxes and lines. It shows the things you track and how they link.
- Database Schema
- The plan of a database. It lists the tables, columns, types and links.
These live in different corners of the glossary (Data and Development), which is exactly why they get confused.