We use cookies to enhance your experience on the site
CodeWorlds

Map of the Library shelves

Before we go on, let us get to know our treasury in detail - the

biblioteka
database. Throughout the journey we will work on the same five shelves. It is worth knowing what each one holds and which fields it has.

Five shelves

| Table | What it stores | |-------|----------------| |

ksiazki
| books: title, author, category, year, price, availability | |
autorzy
| the creators of the books: first name, last name, country, birth year | |
kategorie
| thematic sections: name | |
czytelnicy
| enrolled people: first name, last name, e-mail, city, enrollment date | |
wypozyczenia
| borrowing history: which book, by whom, when |

Fields of the ksiazki shelf

The

ksiazki
shelf is our main collection. It has the columns:

  • id
    - primary key (the scroll's catalog number),
  • tytul
    - the title of the book,
  • autor_id
    - a cross-reference to the authors shelf,
  • kategoria_id
    - a cross-reference to the categories shelf,
  • rok_wydania
    - the year of publication,
  • cena
    - the price of the copy,
  • dostepna
    - whether the book is on the shelf.

The czytelnicy shelf

The

czytelnicy
shelf stores the people enrolled in the Library. Its columns are
id
,
imie
,
nazwisko
,
email
,
miasto
,
data_zapisu
.

The wypozyczenia shelf

The

wypozyczenia
shelf records who took which book and when. Columns:
id
,
ksiazka_id
,
czytelnik_id
,
data_wypozyczenia
,
data_zwrotu
.

Remember these names - you will use them in almost every query in this land!

Go to CodeWorlds