A relational database organises data into tables (relations). Understanding this structure — rows, columns, keys, and the relationships between tables — is the foundation everything else builds on.
Tables, rows & columns
| Term | Meaning |
|---|---|
Table | A collection of related data (e.g. students) |
Row | A single record (one student) |
Column | A field/attribute (name, email) with a type |
Primary key | A column uniquely identifying each row |
Foreign key | A column referencing another table's primary key |
Relationships
Instead of repeating data, relational databases link tables. A students table stores a programme_id that references a programmes table — store each fact once, reference it everywhere. That's the "relational" in relational database.
Key takeaways
- 01Data lives in tables of rows (records) and columns (typed fields).
- 02A primary key uniquely identifies each row.
- 03A foreign key references another table's primary key, linking tables.
- 04Store each fact once and link with keys — the essence of the relational model.
