We use cookies to enhance your experience on the site
CodeWorlds

Welcome to the Great Library!

Welcome @name within the walls of the Great Library of Alexandria - the greatest treasury of knowledge of the ancient world! I am Callimachus, Keeper of the Catalog. It was I who created the Pinakes - the first catalog in history, which lets you find any scroll among hundreds of thousands.

Today I will teach you the art that lies at the heart of every library - data management. In our world we call it MySQL.

What is a database?

Imagine our Library:

  • Shelves (halls) are tables - each shelf holds one kind of thing: one for book scrolls, another for reader lists.
  • Scrolls on a shelf are rows (records) - each scroll describes a single book.
  • The fields on a scroll (title, year of publication, price) are columns.
  • The whole Library is a database - an organized collection of all the shelves.

A database is simply an organized way of storing information so it can be quickly saved, found, changed and deleted.

Example: a shelf of books

| id | tytul | rok_wydania | cena | |----|-------|-------------|------| | 1 | Iliad | -750 | 25 | | 2 | Odyssey | -720 | 30 | | 3 | Republic | -375 | 40 |

This is a table named

ksiazki
. It has 3 rows (three books) and 4 columns (
id
,
tytul
,
rok_wydania
,
cena
).

Every row has a unique identifier in the

id
column - like a scroll's catalog number. Thanks to it we will never confuse two books, even if they share the same title.

In this land you will learn to speak with the Library in its own language - SQL. THE TREASURY AWAITS!

Go to CodeWorlds