Data and databases
What is a database?
Data is recorded information, such as a product name or price. A database is an organized collection of data. A database management system (DBMS), such as SQLite or PostgreSQL, is software that manages access to that data. SQL is a language for requesting and changing data; it is not itself a database.
A shop example
Imagine a shop with four products and three customers. Keeping products in one organized table makes it possible to retrieve names and prices consistently. The supplied shop fixture uses integer cents, so 350 represents 3.50 dollars in this fictional shop. A database can enforce rules, such as preventing negative prices; it does not automatically guarantee that every recorded fact is correct.
Practice
Identify three facts you would store about a library book. Decide which fact might change over time. Do not confuse the database with the program used to view it.