What a database is
A database is a super-organized toy box with labelled drawers. Each drawer is a table, like "Customers" or "Orders". SQL is the language you use to ask the toy box for exactly what you want.
- A relational database stores data in tables. Each row is one record (one customer). Each column is one property (name, city).
- A primary key is a column that uniquely identifies each row, usually
id. - A foreign key is a column that points to another table's primary key, for example
orders.customer_idpoints tocustomers.id. This is how tables connect. - SQL (Structured Query Language) is the standard language for asking relational databases questions and changing their data. Many people pronounce it "sequel" or "S-Q-L"; both are fine.
- SQLite is a small, free database that stores a whole database in one file. The SQLite project says it is likely used more than all other database engines combined, and that it is built into every Android device, every iPhone, every Mac, every Windows 10/11 installation and the Firefox, Chrome and Safari browsers.
- Spreadsheets vs databases: a spreadsheet is great for one person and thousands of rows. A database handles millions of rows, many users at once and strict rules about what data is allowed.
- Think of a small business you know.
- On paper, draw a table called Customers with columns id, name and city.
- Mark id as the primary key.
- Draw a second table called Orders with columns id, customer_id, product, amount and order_date.
- Draw an arrow from Orders.customer_id to Customers.id. That is the foreign key.
- Write two sample rows in each table.
- Check: you can explain what each row and each column means.
Videos by other creators on YouTube, for reference. They are not made by or affiliated with The Future Market.
Read the video script
[Host] "Every app you use, from your bank to your phone's contacts, keeps its data in a database."
[Screen: two tables, customers and orders, with an arrow from customer_id to id] "Tables, rows, columns. And keys that link one table to another."
[Text on screen: SQL = Structured Query Language] "SQL is how you ask the database questions. And you're going to write it today."
On paper, design two tables for a small business you know: one for customers and one for orders. Mark the primary key in each and the foreign key that links them.
ClaudeStuck? Copy a ready-made prompt for Claude
Copy this, open Claude, paste it, and Claude will walk you through the lesson step by step.
For a grown-up: Claude is for adults (18+). Copy this, paste it into Claude, and use the answer to explain the lesson to your child.
I'm learning "SQL Basics" on The Future Market. Lesson 1: "What a database is". What the lesson teaches: - A relational database stores data in tables. Each row is one record (one customer). Each column is one property (name, city). - A primary key is a column that uniquely identifies each row, usually id. - A foreign key is a column that points to another table's primary key, for example orders.customer_id points to customers.id. This is how tables connect. - SQL (Structured Query Language) is the standard language for asking relational databases questions and changing their data. Many people pronounce it "sequel" or "S-Q-L"; both are fine. - SQLite is a small, free database that stores a whole database in one file. The SQLite project says it is likely used more than all other database engines combined, and that it is built into every Android device, every iPhone, every Mac, every Windows 10/11 installation and the Firefox, Chrome and Safari browsers. - Spreadsheets vs databases: a spreadsheet is great for one person and thousands of rows. A database handles millions of rows, many users at once and strict rules about what data is allowed. The exercise I'm working on: On paper, design two tables for a small business you know: one for customers and one for orders. Mark the primary key in each and the foreign key that links them. I'm stuck. Please: 1. Explain the main idea in plain, simple words with one everyday example. 2. Walk me through the exercise one small step at a time. Ask me what I've done so far before giving the next step. 3. Don't just give me the final answer. Help me do it myself, and check my work when I share it.
I'm a parent helping my child (about 8 years old) with a lesson called "What a database is" from the course "SQL Basics". Here's what the lesson says: A database is a super-organized toy box with labelled drawers. Each drawer is a table, like "Customers" or "Orders". SQL is the language you use to ask the toy box for exactly what you want. The activity: On paper, design two tables for a small business you know: one for customers and one for orders. Mark the primary key in each and the foreign key that links them. Please explain this so an 8-year-old understands: short sentences, a fun everyday example, and no hard words. Then give me 3 simple questions I can ask my child to check they understood, and a way to do the activity together, one tiny step at a time.
Sources
- SQLite, most widely deployed and used database engine: www.sqlite.org/mostdeployed.html
Set up a practice database
This lesson is part of full access: every course and every level for one payment.
SELECT, WHERE, ORDER BY, LIMIT
This lesson is part of full access: every course and every level for one payment.
Summaries with COUNT, SUM, AVG and GROUP BY
This lesson is part of full access: every course and every level for one payment.
JOIN: connecting tables
This lesson is part of full access: every course and every level for one payment.
Changing data safely (and SQL injection)
This lesson is part of full access: every course and every level for one payment.
Final project
This lesson is part of full access: every course and every level for one payment.
Quiz
What is a primary key?
A column that uniquely identifies each row in a table.
What does
SELECT *mean?Show all columns.
How do you write text values in SQL?
In single quotes, like 'Toronto'.
What's the difference between WHERE and HAVING?
WHERE filters rows before grouping; HAVING filters groups after grouping.
What does
ORDER BY amount DESC LIMIT 3return?The three rows with the largest amounts.
What does LEFT JOIN do that JOIN doesn't?
Keeps every row from the left table, even with no match.
What happens if you run DELETE without WHERE?
Every row in the table is deleted.
How do you find empty values?
WHERE column IS NULL.What is SQL injection, and how do apps prevent it?
An attack that slips SQL code into user input; prevent it with parameterized queries (placeholders).
Which free database is built into every Android device and iPhone, according to its makers?
SQLite.
Final exam
This lesson is part of full access: every course and every level for one payment.
Certificate
This lesson is part of full access: every course and every level for one payment.