22 min read
What is a Table?
A table is a list of one type of thing, with columns chosen first and one row per item.
A database holds related facts. The most basic unit inside it is the table.
A table is a subject-based list arranged in rows and columns. You choose the columns first. Each row is one more of the same kind of thing.
Riverside Public Library needs a list of members and a list of books. Those are two different kinds of thing. Each gets its own table.
| Members | |||
|---|---|---|---|
| Books | ||
|---|---|---|
One type of thing per table
Do not put members and books in the same list. Then one column means two different things.
On one row, the extra column holds 07700 900 123. On the next row, it holds A. Morgan. The City column is empty for books because a book has no city.
| One mixed list | ||
|---|---|---|
Two tables fix the problem. Members holds people. Books holds titles. Every column has one job.
This rule is not library-only. A cinema keeps films in one list and tickets in another. A shop keeps products and sales in separate tables. One table, one type of thing.
Two piles, two tables
Practice
Swipe or use the arrows to move between questions.
1 / 3
More lessons in Database Fundamentals · Next: Entities · Previous: Relational Database
