SQL and MySQL course Β· Module 1: Introduction to databases
The Gate is open - summary
In this lesson3
Congratulations! You have passed through the Gate of the Great Library. Here is what you already know:
What you have learned
- A database is an organized collection of data - like our Library full of shelves.
- Table = shelf, row = scroll, column = field.
- The primary key (
id) uniquely identifies every row. - MySQL is an RDBMS system working in the client-server model.
- SQL is the Library's command language.
- SELECT ... FROM ... retrieves data from a table;
*means all columns. - We list columns separated by a comma, and we end every query with a semicolon ";".
- We write keywords in UPPERCASE by convention; a comment begins with
--.
Our Library - map of the shelves
Throughout the journey we will work on the same biblioteka database:
| Table | What it stores |
|---|---|
ksiazki | titles, year of publication, price, availability |
autorzy | the creators of the books |
kategorie | thematic sections |
czytelnicy | people enrolled in the Library |
wypozyczenia | borrowing history |
What's next?
In the next location - the Catalog Hall - you will learn to arrange results: give fields nicknames (AS), remove repeats (DISTINCT), sort scrolls (ORDER BY) and limit their number (LIMIT). Filtering with WHERE awaits you in the Scriptorium. Onward, deeper into the Library!
Spotted a mistake in this lesson?