Think of a database like a massive Excel workbook. Each sheet is a table. Each row is a record. Each column is a field. SQL is the language you use to ask questions about that data. "Show me all active users." "How many orders were placed today?" "Which customer has the highest balance?" That is SQL.
| Concept | Excel Equivalent | Example |
|---|---|---|
| Database | Workbook | banking_app_db |
| Table | Sheet | users, orders, accounts |
| Row | Single row of data | One user record |
| Column | Column header | first_name, email, status |
| Primary Key | Row number (unique) | user_id = 1 |
| Foreign Key | VLOOKUP reference | orders.user_id -> users.id |
Good news — SQL syntax is 90% the same across all databases. Learn it once, use it everywhere. The remaining 10% is mostly date functions and string functions that differ slightly.
Q: What is the difference between SQL and MySQL?
A: SQL is a language — like English. MySQL is a database product — like a library that understands English. You use SQL to talk to MySQL, PostgreSQL, Oracle, and other databases. Saying "I know SQL" means you know the language. Saying "I know MySQL" means you have worked with that specific database.
Key Point: SQL is a language, not a database. It works across MySQL, PostgreSQL, Oracle, and others with minimal differences.