What a database is
Tables, rows and columns
A database keeps information organised so you can find it, change it and trust it. A relational database like PostgreSQL stores it in tables — a bit like spreadsheets:
| id | name | price | vegetarian |
|---|---|---|---|
| 1 | Flat white | 4.80 | true |
| 2 | Latte | 4.80 | true |
| 11 | Ham and cheese toastie | 9.50 | false |
- Each row is one thing — here, one item on the menu
- Each column is one fact about it, and every value in a column has the same type (all prices are numbers, all names are text)
- Each row has an id that's never repeated, so you can always point to exactly one row
Why not just use a spreadsheet?
| A database… | Which means |
|---|---|
| Checks every value against rules | No "abc" in a price column, no order for a staff member who doesn't exist |
| Handles millions of rows | Fast answers even with years of sales |
| Lets many people and apps use it at once | The till, the website and the manager's report all at the same time |
| Links tables together | Change a price once, not in 50 places |
SQL: the language of databases
You talk to the database in SQL (say "S-Q-L" or "sequel"). It reads almost like English:
SELECT name, price
FROM menu_items
WHERE vegetarian = true
ORDER BY price;
SQL has been around since the 1970s and is used by nearly every database — PostgreSQL, MySQL, SQL Server, Oracle, SQLite. Learn it once, use it everywhere.
Why PostgreSQL?
- Free and open source — no licence to buy, for any use
- Popular — in recent Stack Overflow developer surveys it's been the most-used database among developers
- Trusted — known for keeping data safe and following the SQL standard closely
- Used by many cloud services you may meet later, like Supabase and Neon
The Corner Café database
All through the course you'll work with the sales records of Corner Café, a made-up neighbourhood café, for March 2026:
| Table | What's in it |
|---|---|
categories | Coffee, Tea, Drinks, Food |
menu_items | 15 items, with prices |
staff | 6 people who work there |
customers | 25 loyalty-card members |
orders | 1,492 orders: when, who served, who bought (if a member), card or cash |
order_items | What was in each order, and how many |
Try it
Download the starter files and unzip them. Open cafe.sql in any text editor (Notepad, TextEdit or VS Code) and have a look — it's just SQL that builds the tables and fills them in. By the end of the course you'll understand every line.
Downloads
1 file to download once you enrol.
