You have written queries in SQL (Structured Query Language). SQL is a language. A program runs it.
The DBMS runs your SQL
A (DBMS) stores the tables and runs the SQL that you send.
The labs in this course run PostgreSQL, a DBMS that runs here in your browser.
SQL is declarative: a query says what rows you want, not how to find them. The DBMS chooses how. Chapter 13 shows you how to read its plan.
One language, many systems
Many systems run SQL:
| DBMS | Where you see it |
|---|---|
| PostgreSQL | web applications, cloud databases |
| MySQL / MariaDB | web applications, university courses |
| SQLite | inside phone apps and browsers |
| SQL Server, Oracle | large companies |
The core is the same everywhere: SELECT, FROM, and everything in the next chapters. Each system has its own dialect: some extra features and some different spellings. When a lesson uses something that differs in MySQL, a note shows the MySQL form.
SELECT without a table
SELECT can return values that are not in a table. The DBMS calculates them:
SELECT 6 * 7;The result has one row and one column: 42.