One language for (almost) every database.
SQL (Structured Query Language) is the language you use to talk to relational databases — MySQL, PostgreSQL, and SQLite all speak it, with only minor dialect differences. Data lives in tables (think spreadsheets: rows of records, columns of fields), and SQL is how you ask questions of it: "give me every order from this customer, newest first."
It's one of the best-value skills in software: learn it once and it transfers to virtually every database, every language, and every job — it has been the standard since the 1970s and isn't going anywhere.
Whenever your app stores structured data — users, posts, orders, anything with consistent fields and relationships between records. That's the vast majority of applications. The main alternative, document databases like Firebase, trade SQL's strict structure and powerful queries for flexibility and real-time sync.
users
table has one row per user and columns like id,
name, email. Each column has a type.
SELECT reads data, INSERT adds rows,
UPDATE changes them, DELETE removes
them. Most daily work is these four.
id; other tables reference it
(orders.user_id) to model relationships.
-- Every order over $50, with the customer's name,
-- newest first
SELECT users.name, orders.total, orders.created_at
FROM orders
JOIN users ON users.id = orders.user_id
WHERE orders.total > 50
ORDER BY orders.created_at DESC
LIMIT 10;
SQL is declarative: you describe what you want, and the database figures out how to fetch it efficiently.
INSERT a few rows, SELECT them back,
UPDATE one, DELETE one.
WHERE, ORDER BY, and aggregate
functions (COUNT, SUM,
GROUP BY) to your queries.
JOIN.