Introduction to MySQL
MySQL is a program that stores data in tables.
You talk to it with SQL. SQL means Structured Query Language.
Think of MySQL as a super organized notebook. Each page is a table. Each row is one fact.
Apps use MySQL to remember users, products, scores, and messages.
Why learn MySQL?
Almost every website needs a place to keep data.
MySQL is free, popular, and used in real jobs.
Used by many websites and apps
SQL looks close to English
Great first database to learn
Works with Python, JavaScript, and more
What you will learn
First you learn tables, columns, and rows.
Then you learn to add, read, change, and remove rows.
Later you learn joins, groups, indexes, and safe transactions.
We go one small idea at a time.
A first peek at SQL
This asks MySQL for every row in a table named foxes.
SELECT means show me. FROM means which table.
| name | color |
|---|---|
| Ruby | red |
| Moss | green |
| Ginger | orange |
3 rows
SQL is a request, not a loop
You do not tell MySQL how to walk the table.
You say what you want. MySQL figures out the steps.
That is why SQL feels like giving orders to a librarian.
| name |
|---|
| Moss |
1 row
Tip: End SQL statements with a semicolon. It tells MySQL the request is done.
Test yourself
Three quick questions made just for this lesson. Earn 10 XP per correct answer.