A database is a structured collection of data that allows people to extract information in a way that meets their needs. The data can include text, numbers, pictures – anything that can be stored in a computer.
Databases prevent problems because:
| Category | Examples |
|---|---|
| People | Patients in a hospital; pupils at a school |
| Things | Cars to be sold; books in a library |
| Events | Hotel bookings (prenotazioni); results of races |
Databases store data in tables:
| Element | Description |
|---|---|
| Field (column) | A category of data; each field has a specific data type (e.g. numberOfStaff → integer / numero intero) |
| Record (row) | Stores details about a specific item using the fields |
| Primary key | A field that uniquely identifies any record in the table; only one per table |