Data in tables
A relational database stores information in tables, like a spreadsheet: columns (the fields) and rows (the records).
For example, a products table:
| id | name | category | price |
|---|---|---|---|
| 1 | Keyboard | peripherals | 25 |
| 2 | Mouse | peripherals | 15 |
| 3 | Monitor | displays | 150 |
SQL
SQL (Structured Query Language) is the language for querying and
manipulating that data. The most common query is SELECT, which reads rows.
SELECT name, price FROM products;
SELECTindicates which columns you want (or*for all of them).FROMindicates which table.- The query ends with
;.
In these exercises you write the query and run it against a real database (SQLite, inside the browser). You will see the result as a table.