🗄
Lesson 17 · grade 15+
Databases and SQL: where the data lives
📖 Lesson
──▶
🎯 Quiz — pick the translation
──▶
✅ Lesson done
A database is tables with rules. The user is the row, the fields are columns: id, name, email. SQL is the question language: SELECT (give), INSERT (add), UPDATE (change), DELETE (remove). On our site listings, users, cities — all live in the database. SELECT * FROM users WHERE city = "Berlin" — "show all Berlin users".
- ●SELECT name, price FROM goods WHERE price < 100 — filter
- ●Relations: the listing has user_id — "who is the author"
- ●An index is like a book index: searches millions instantly
🗄 SQL injection is when an attacker "queries" the database through an input field: '; DROP TABLE users;-- . That is why code always filters input!
🎯
Test yourself!
Quiz — pick the translation →
🖨 Worksheet
Practice the topic with the trainer — like after class