Every field of a shelf must know what kind of data it accepts. It is like drawers for scrolls: one for numbers, another for dates, another for long stories. In MySQL we call these drawers data types.
rok_wydania or id.p is the total number of digits, s is the digits after the decimal point. DECIMAL(8,2) will store amounts like 29.99 - perfect for cena.n characters. For tytul we will use e.g. VARCHAR(255), for imie - VARCHAR(50).opis (description) or the content of a review.2024-03-15. Fits data_wypozyczenia, data_zwrotu.2024-03-15 14:30:00.Match the type to the data! Numbers to INT, amounts to DECIMAL, short strings to VARCHAR, long descriptions to TEXT, dates to DATE. The wrong drawer means chaos in the Library - we do not keep numbers in a drawer meant for text, nor do we cram text into a drawer meant for numbers.